-
Notifications
You must be signed in to change notification settings - Fork 5
skaffold: api to use kubectl post argocd #1955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
tarrow
wants to merge
1
commit into
main
Choose a base branch
from
skaffold4API
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,219 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| annotations: {} | ||
| labels: | ||
| app.kubernetes.io/instance: api | ||
| app.kubernetes.io/managed-by: Helm | ||
| app.kubernetes.io/name: api | ||
| app.kubernetes.io/version: "1.0" | ||
| argocd.argoproj.io/instance: api | ||
| helm.sh/chart: api-0.35.0 | ||
| name: api-app-backend | ||
| namespace: default | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/component: app-backend | ||
| app.kubernetes.io/instance: api | ||
| app.kubernetes.io/name: api | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/component: app-backend | ||
| app.kubernetes.io/instance: api | ||
| app.kubernetes.io/name: api | ||
| spec: | ||
| containers: | ||
| - env: | ||
| - name: CONTAINER_ROLE | ||
| value: app | ||
| - name: ROUTES_LOAD_WEB | ||
| value: "0" | ||
| - name: ROUTES_LOAD_BACKEND | ||
| value: "1" | ||
| - name: APP_NAME | ||
| value: WBaaS Localhost | ||
| - name: APP_ENV | ||
| value: local | ||
| - name: APP_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| key: api-app-key | ||
| name: api-app-secrets | ||
| - name: APP_DEBUG | ||
| value: "true" | ||
| - name: APP_URL | ||
| value: https://www.wbaas.dev | ||
| - name: APP_TIMEZONE | ||
| value: UTC | ||
| - name: WBSTACK_SUBDOMAIN_SUFFIX | ||
| value: .wbaas.dev | ||
| - name: WBSTACK_UI_URL | ||
| value: https://wbaas.dev | ||
| - name: WBSTACK_WIKI_DB_PROVISION_VERSION | ||
| value: mw1.43-wbs1 | ||
| - name: WBSTACK_WIKI_DB_USE_VERSION | ||
| value: mw1.43-wbs1 | ||
| - name: WBSTACK_SUMMARY_CREATION_RATE_RANGES | ||
| value: PT24H,P30D | ||
| - name: WBSTACK_SIGNUP_THROTTLING_LIMIT | ||
| value: "20" | ||
| - name: WBSTACK_SIGNUP_THROTTLING_RANGE | ||
| value: PT24H | ||
| - name: WBSTACK_QS_BATCH_PENDING_TIMEOUT | ||
| value: PT300S | ||
| - name: WBSTACK_QS_BATCH_MARK_FAILED_AFTER | ||
| value: "3" | ||
| - name: WBSTACK_CONTACT_MAIL_RECIPIENT | ||
| value: [email protected] | ||
| - name: WBSTACK_CONTACT_MAIL_SENDER | ||
| value: contact-<subject>@wbaas.dev | ||
| - name: WBSTACK_COMPLAINT_MAIL_RECIPIENT | ||
| value: [email protected] | ||
| - name: WBSTACK_COMPLAINT_MAIL_SENDER | ||
| value: [email protected] | ||
| - name: WBSTACK_ELASTICSEARCH_ENABLED_BY_DEFAULT | ||
| value: "true" | ||
| - name: TRUSTED_PROXY_PROXIES | ||
| value: '*' | ||
| - name: ELASTICSEARCH_SHARED_INDEX_HOST | ||
| value: elasticsearch-2.default.svc.cluster.local:9200 | ||
| - name: ELASTICSEARCH_SHARED_INDEX_PREFIX | ||
| value: wiki_1 | ||
| - name: QUERY_SERVICE_HOST | ||
| value: queryservice.default.svc.cluster.local:9999 | ||
| - name: PLATFORM_MW_BACKEND_HOST | ||
| value: mediawiki-143-app-backend.default.svc.cluster.local | ||
| - name: REDIS_HOST | ||
| value: redis-master.default.svc.cluster.local | ||
| - name: REDIS_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| key: password | ||
| name: redis-password | ||
| - name: REDIS_PORT | ||
| value: "6379" | ||
| - name: REDIS_DB | ||
| value: "2" | ||
| - name: REDIS_CACHE_DB | ||
| value: "3" | ||
| - name: REDIS_PREFIX | ||
| value: wikibase_dev_api | ||
| - name: MAIL_MAILER | ||
| value: smtp | ||
| - name: MAILGUN_DOMAIN | ||
| value: sandbox111.mailgun.org | ||
| - name: MAILGUN_SECRET | ||
| value: abc123 | ||
| - name: MAIL_FROM_ADDRESS | ||
| value: [email protected] | ||
| - name: MAIL_FROM_NAME | ||
| value: Wikibase-dev | ||
| - name: MAIL_HOST | ||
| value: mailhog | ||
| - name: MAIL_PORT | ||
| value: "1025" | ||
| - name: MAIL_ENCRYPTION | ||
| value: null | ||
| - name: MAIL_USERNAME | ||
| - name: MAIL_PASSWORD | ||
| - name: GOOGLE_CLOUD_PROJECT_ID | ||
| value: something | ||
| - name: GOOGLE_CLOUD_STORAGE_BUCKET | ||
| valueFrom: | ||
| configMapKeyRef: | ||
| key: gcs_api_static_bucket_name | ||
| name: storage-bucket | ||
| optional: true | ||
| - name: GOOGLE_CLOUD_STORAGE_KEY_FILE | ||
| value: /var/run/secret/cloud.google.com/key.json | ||
| - name: LOG_CHANNEL | ||
| value: stderr | ||
| - name: LOG_LEVEL | ||
| value: debug | ||
| - name: STACKDRIVER_ENABLED | ||
| value: "false" | ||
| - name: STACKDRIVER_PROJECT_ID | ||
| value: something | ||
| - name: STACKDRIVER_LOGGING_ENABLED | ||
| value: "false" | ||
| - name: STACKDRIVER_TRACING_ENABLED | ||
| value: "false" | ||
| - name: STACKDRIVER_ERROR_REPORTING_ENABLED | ||
| value: "true" | ||
| - name: STACKDRIVER_KEY_FILE_PATH | ||
| value: /var/run/secret/cloud.google.com/key.json | ||
| - name: STACKDRIVER_ERROR_REPORTING_BATCH_ENABLED | ||
| value: "false" | ||
| - name: STACKDRIVER_LOGGING_BATCH_ENABLED | ||
| value: "false" | ||
| - name: CACHE_DRIVER | ||
| value: redis | ||
| - name: QUEUE_CONNECTION | ||
| value: redis | ||
| - name: JWT_SECRET | ||
| valueFrom: | ||
| secretKeyRef: | ||
| key: api-app-jwt-secret | ||
| name: api-app-secrets | ||
| - name: DB_CONNECTION | ||
| value: mysql | ||
| - name: DB_HOST_READ | ||
| value: sql-mariadb-secondary.default.svc.cluster.local | ||
| - name: DB_HOST_WRITE | ||
| value: sql-mariadb-primary.default.svc.cluster.local | ||
| - name: DB_PORT | ||
| value: "3306" | ||
| - name: DB_DATABASE | ||
| value: apidb | ||
| - name: DB_USERNAME | ||
| value: apiuser | ||
| - name: DB_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| key: SQL_INIT_PASSWORD_API | ||
| name: sql-secrets-init-passwords | ||
| - name: PASSPORT_PUBLIC_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| key: oauth-public.key | ||
| name: api-passport-keys | ||
| - name: PASSPORT_PRIVATE_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| key: oauth-private.key | ||
| name: api-passport-keys | ||
| image: ghcr.io/wbstack/api:10x.18.2 | ||
| imagePullPolicy: IfNotPresent | ||
| livenessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
| path: /backend/healthz | ||
| port: http | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 10 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 2 | ||
| name: api-backend | ||
| ports: | ||
| - containerPort: 80 | ||
| name: http | ||
| protocol: TCP | ||
| readinessProbe: | ||
| failureThreshold: 3 | ||
| httpGet: | ||
| path: /backend/healthz | ||
| port: http | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 10 | ||
| successThreshold: 1 | ||
| timeoutSeconds: 2 | ||
| resources: | ||
| limits: | ||
| cpu: 1000m | ||
| memory: 600Mi | ||
| requests: | ||
| cpu: 200m | ||
| memory: 300Mi |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are these
k8s/api-*.yamlfiles being kept in sync with the helmfile/argo values files? I'm also not a fan of having to modify the same values in multiple files (e.g. to swap from using mw1.39 to mw1.43 DBs).How did you create these files in the first place? Maybe we can create a script that gets run before skaffold to create these files from the source of truth (currently the helmfile values files)? If they become derived files, do they even need to be checked into the repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 i think this will bite us if we just duplicate here
not sure how tom did it but this command gives something similar:
helmfile -e local template -l name=api -f only-for-argo-value-generation.yamlThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, in general I don't think we should merge this patch :P. I think this is a very rough starting point for trying to use skaffold without helm.
I think your pre-run script also sounds smart and we could do that but I'd kinda hope we could figure out a more skaffold native way