From ee5741bffeaec49a18d70c6060a89a410bd328c1 Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Thu, 21 Dec 2023 12:42:49 +0530 Subject: [PATCH 01/13] [ci] fix syft dev k8s pipeline --- .github/workflows/cd-syft-dev.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd-syft-dev.yml b/.github/workflows/cd-syft-dev.yml index 61c149ee07c..5cb8235f423 100644 --- a/.github/workflows/cd-syft-dev.yml +++ b/.github/workflows/cd-syft-dev.yml @@ -143,13 +143,15 @@ jobs: python -m pip install --upgrade pip pip install tox - export CONTAINER_REGISTRY=${{ secrets.ACR_SERVER }} - export VERSION=dev-${{github.sha}} tox -e syft.build.helm rm -rf infrastructure/gitops/environments/dev/ mkdir -p infrastructure/gitops/environments/dev/ - cp -R packages/grid/helm/syft/. packages/grid/helm/manifests.yaml infrastructure/gitops/environments/dev/ + + cp -R packages/grid/helm/syft/. infrastructure/gitops/environments/dev/ + + # write version to VERSION.txt file + echo "dev-${{github.sha}}" > infrastructure/gitops/environments/dev/VERSION.txt - name: Commit & push changes to Infra Repo if: github.ref == 'refs/heads/dev' || github.event.inputs.deploy-helm == 'true' From d2d8745138a5da8aa2bf556829197125b4d54974 Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Thu, 21 Dec 2023 12:43:15 +0530 Subject: [PATCH 02/13] [helm] cleanup secrets --- .../helm/syft/templates/backend-statefulset.yaml | 10 +++++----- .../{mongo_secrets.yaml => mongo-secret.yaml} | 4 ++-- .../helm/syft/templates/mongo-statefulset.yaml | 2 +- ...weedfs_secrets.yaml => seaweedfs-secret.yaml} | 4 ++-- .../syft/templates/seaweedfs-statefulset.yaml | 2 +- .../{syft_secrets.yaml => syft-secret.yaml} | 4 ++-- packages/grid/helm/syft/values.yaml | 16 +++------------- 7 files changed, 16 insertions(+), 26 deletions(-) rename packages/grid/helm/syft/templates/{mongo_secrets.yaml => mongo-secret.yaml} (89%) rename packages/grid/helm/syft/templates/{seaweedfs_secrets.yaml => seaweedfs-secret.yaml} (86%) rename packages/grid/helm/syft/templates/{syft_secrets.yaml => syft-secret.yaml} (91%) diff --git a/packages/grid/helm/syft/templates/backend-statefulset.yaml b/packages/grid/helm/syft/templates/backend-statefulset.yaml index 5c793361884..8adb75b2e88 100644 --- a/packages/grid/helm/syft/templates/backend-statefulset.yaml +++ b/packages/grid/helm/syft/templates/backend-statefulset.yaml @@ -36,7 +36,7 @@ spec: - name: MONGO_PASSWORD valueFrom: secretKeyRef: - name: {{ .Values.secrets.db.mongo.mongosecret }} + name: {{ .Values.secrets.mongo }} key: mongo-password-secret - name: SERVICE_NAME value: backend @@ -55,7 +55,7 @@ spec: - name: STACK_API_KEY valueFrom: secretKeyRef: - name: {{ .Values.secrets.syft.syftsecret }} + name: {{ .Values.secrets.syft }} key: stackApiKey - name: PORT value: '80' @@ -84,14 +84,14 @@ spec: - name: DEFAULT_ROOT_PASSWORD valueFrom: secretKeyRef: - name: {{ .Values.secrets.syft.syftsecret }} + name: {{ .Values.secrets.syft }} key: defaultRootPassword - name: S3_ROOT_USER - value: "{{ .Values.seaweedfs.S3_ROOT_USER }}" + value: "{{ .Values.seaweedfs.s3RootUser }}" - name: S3_ROOT_PWD valueFrom: secretKeyRef: - name: {{ .Values.secrets.seaweedfs.seaweedfsecret }} + name: {{ .Values.secrets.seaweedfs }} key: S3_ROOT_PWD_SECRET - name: S3_PORT value: "{{ .Values.seaweedfs.S3_PORT }}" diff --git a/packages/grid/helm/syft/templates/mongo_secrets.yaml b/packages/grid/helm/syft/templates/mongo-secret.yaml similarity index 89% rename from packages/grid/helm/syft/templates/mongo_secrets.yaml rename to packages/grid/helm/syft/templates/mongo-secret.yaml index ae294033ab6..1e34a0a3edf 100644 --- a/packages/grid/helm/syft/templates/mongo_secrets.yaml +++ b/packages/grid/helm/syft/templates/mongo-secret.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: Secret metadata: - name: "mongosecret" + name: "mongo-default-secret" type: Opaque data: {{- if not .Values.configuration.devmode }} - {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "mongosecret") | default dict }} + {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "mongo-default-secret") | default dict }} {{- $secretData := (get $secretObj "data") | default dict }} # Helm does not allow hypen character, as a variable name , so we conform to camelCase diff --git a/packages/grid/helm/syft/templates/mongo-statefulset.yaml b/packages/grid/helm/syft/templates/mongo-statefulset.yaml index c08a20f57b2..eaeaeaac3ab 100644 --- a/packages/grid/helm/syft/templates/mongo-statefulset.yaml +++ b/packages/grid/helm/syft/templates/mongo-statefulset.yaml @@ -32,7 +32,7 @@ spec: - name: MONGO_INITDB_ROOT_PASSWORD valueFrom: secretKeyRef: - name: {{ .Values.secrets.db.mongo.mongosecret }} + name: {{ .Values.secrets.mongo }} key: mongo-password-secret envFrom: null image: mongo:7.0.4 diff --git a/packages/grid/helm/syft/templates/seaweedfs_secrets.yaml b/packages/grid/helm/syft/templates/seaweedfs-secret.yaml similarity index 86% rename from packages/grid/helm/syft/templates/seaweedfs_secrets.yaml rename to packages/grid/helm/syft/templates/seaweedfs-secret.yaml index 8ad84b642bd..15c5528af41 100644 --- a/packages/grid/helm/syft/templates/seaweedfs_secrets.yaml +++ b/packages/grid/helm/syft/templates/seaweedfs-secret.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: Secret metadata: - name: "seaweedfsecret" + name: "seaweedfs-default-secret" type: Opaque data: {{- if not .Values.configuration.devmode }} - {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "seaweedfsecret") | default dict }} + {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "seaweedfs-default-secret") | default dict }} {{- $secretData := (get $secretObj "data") | default dict }} diff --git a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml index 04753974e17..5c9ebdfe3dc 100644 --- a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml +++ b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml @@ -35,7 +35,7 @@ spec: - name: S3_ROOT_PWD valueFrom: secretKeyRef: - name: {{ .Values.secrets.seaweedfs.seaweedfsecret }} + name: {{ .Values.secrets.seaweedfs }} key: S3_ROOT_PWD_SECRET - name: S3_PORT value: "{{ .Values.seaweedfs.S3_PORT }}" diff --git a/packages/grid/helm/syft/templates/syft_secrets.yaml b/packages/grid/helm/syft/templates/syft-secret.yaml similarity index 91% rename from packages/grid/helm/syft/templates/syft_secrets.yaml rename to packages/grid/helm/syft/templates/syft-secret.yaml index b09116df291..4ebd8dd69e6 100644 --- a/packages/grid/helm/syft/templates/syft_secrets.yaml +++ b/packages/grid/helm/syft/templates/syft-secret.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: Secret metadata: - name: "syftsecret" + name: "syft-default-secret" type: Opaque data: {{- if not .Values.configuration.devmode }} - {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "syftsecret") | default dict }} + {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "syft-default-secret") | default dict }} {{- $secretData := (get $secretObj "data") | default dict }} {{- $stackApiKey_env := (get $secretData "stackApiKey") | default (randAlphaNum 32 | b64enc) }} diff --git a/packages/grid/helm/syft/values.yaml b/packages/grid/helm/syft/values.yaml index fe381869bce..93167f0bec7 100644 --- a/packages/grid/helm/syft/values.yaml +++ b/packages/grid/helm/syft/values.yaml @@ -3,19 +3,9 @@ # Declare variables to be passed into your templates. secrets: - syft: - syftsecret: "syftsecret" - # stackApiKey: "changeme" - # defaultRootPassword: "changethis" - db: - mongo: - # mongoPassword: "example" - # mongoInitdbRootPassword: "example" - # mongoUsername: "root" - # mongoInitdbRootUsername: "root" - mongosecret: "mongosecret" - seaweedfs: - seaweedfsecret: "seaweedfsecret" + syft: syft-default-secret + mongo: mongo-default-secret + seaweedfs: seaweedfs-default-secret configuration: devmode: false From 5c8d1a249e9bf6a94e74a7596fee124f50e27ead Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Thu, 21 Dec 2023 12:49:02 +0530 Subject: [PATCH 03/13] [helm] cleanup seaweedfs values --- .../grid/helm/syft/templates/backend-statefulset.yaml | 4 ++-- .../helm/syft/templates/seaweedfs-statefulset.yaml | 8 ++++---- packages/grid/helm/syft/values.yaml | 10 ++++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/grid/helm/syft/templates/backend-statefulset.yaml b/packages/grid/helm/syft/templates/backend-statefulset.yaml index 8adb75b2e88..a65f108d950 100644 --- a/packages/grid/helm/syft/templates/backend-statefulset.yaml +++ b/packages/grid/helm/syft/templates/backend-statefulset.yaml @@ -94,9 +94,9 @@ spec: name: {{ .Values.secrets.seaweedfs }} key: S3_ROOT_PWD_SECRET - name: S3_PORT - value: "{{ .Values.seaweedfs.S3_PORT }}" + value: "{{ .Values.seaweedfs.s3Port }}" - name: SEAWEED_MOUNT_PORT - value: "{{ .Values.seaweedfs.SEAWEED_MOUNT_PORT }}" + value: "{{ .Values.seaweedfs.mountPort }}" envFrom: null image: {{ .Values.container.registry }}/openmined/grid-backend:{{ .Values.container.syft_version }} lifecycle: null diff --git a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml index 5c9ebdfe3dc..12f7329b439 100644 --- a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml +++ b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml @@ -29,18 +29,18 @@ spec: command: null env: - name: S3_VOLUME_SIZE_MB - value: "{{ .Values.seaweedfs.S3_VOLUME_SIZE_MB }}" + value: "{{ .Values.seaweedfs.s3VolumeSizeMB }}" - name: S3_ROOT_USER - value: "{{ .Values.seaweedfs.S3_ROOT_USER }}" + value: "{{ .Values.seaweedfs.s3RootUser }}" - name: S3_ROOT_PWD valueFrom: secretKeyRef: name: {{ .Values.secrets.seaweedfs }} key: S3_ROOT_PWD_SECRET - name: S3_PORT - value: "{{ .Values.seaweedfs.S3_PORT }}" + value: "{{ .Values.seaweedfs.s3Port }}" - name: SEAWEED_MOUNT_PORT - value: "{{ .Values.seaweedfs.SEAWEED_MOUNT_PORT }}" + value: "{{ .Values.seaweedfs.mountPort }}" envFrom: null image: {{ .Values.container.registry }}/openmined/grid-seaweedfs:{{ .Values.container.syft_version }} lifecycle: null diff --git a/packages/grid/helm/syft/values.yaml b/packages/grid/helm/syft/values.yaml index 93167f0bec7..1be7f0f655a 100644 --- a/packages/grid/helm/syft/values.yaml +++ b/packages/grid/helm/syft/values.yaml @@ -18,10 +18,12 @@ db: mongoUsername: "root" seaweedfs: - S3_VOLUME_SIZE_MB: 1024 - S3_PORT: 8333 - SEAWEED_MOUNT_PORT: 4001 - S3_ROOT_USER: "admin" + # SeaweedFS config + mountPort: 4001 + # SeaweedFS S3 Config + s3VolumeSizeMB: 1024 + s3Port: 8333 + s3RootUser: "admin" container: registry: "docker.io" From b9e77e46afe9e4b298b2e2b7df43703a79b1c16d Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Thu, 21 Dec 2023 12:51:55 +0530 Subject: [PATCH 04/13] [helm] cleanup container+version --- packages/grid/helm/syft/templates/backend-statefulset.yaml | 4 ++-- packages/grid/helm/syft/templates/frontend-deployment.yaml | 4 ++-- packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml | 2 +- packages/grid/helm/syft/values.yaml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/grid/helm/syft/templates/backend-statefulset.yaml b/packages/grid/helm/syft/templates/backend-statefulset.yaml index a65f108d950..0777795b42f 100644 --- a/packages/grid/helm/syft/templates/backend-statefulset.yaml +++ b/packages/grid/helm/syft/templates/backend-statefulset.yaml @@ -43,7 +43,7 @@ spec: - name: RELEASE value: production - name: VERSION - value: {{ .Values.container.syft_version }} + value: {{ .Values.syft.version }} - name: VERSION_HASH value: {{ .Values.node.settings.versionHash }} - name: NODE_TYPE @@ -98,7 +98,7 @@ spec: - name: SEAWEED_MOUNT_PORT value: "{{ .Values.seaweedfs.mountPort }}" envFrom: null - image: {{ .Values.container.registry }}/openmined/grid-backend:{{ .Values.container.syft_version }} + image: {{ .Values.syft.registry }}/openmined/grid-backend:{{ .Values.syft.version }} lifecycle: null livenessProbe: null name: container-0 diff --git a/packages/grid/helm/syft/templates/frontend-deployment.yaml b/packages/grid/helm/syft/templates/frontend-deployment.yaml index a1bdaddb2e6..67e76677703 100644 --- a/packages/grid/helm/syft/templates/frontend-deployment.yaml +++ b/packages/grid/helm/syft/templates/frontend-deployment.yaml @@ -28,7 +28,7 @@ spec: command: null env: - name: VERSION - value: {{ .Values.container.syft_version }} + value: {{ .Values.syft.version }} - name: VERSION_HASH value: {{ .Values.node.settings.versionHash }} - name: NODE_TYPE @@ -36,7 +36,7 @@ spec: - name: NEXT_PUBLIC_API_URL value: ${NEXT_PUBLIC_API_URL} envFrom: null - image: {{ .Values.container.registry }}/openmined/grid-frontend:{{ .Values.container.syft_version }} + image: {{ .Values.syft.registry }}/openmined/grid-frontend:{{ .Values.syft.version }} lifecycle: null livenessProbe: null name: container-0 diff --git a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml index 12f7329b439..b92ce5bea21 100644 --- a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml +++ b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml @@ -42,7 +42,7 @@ spec: - name: SEAWEED_MOUNT_PORT value: "{{ .Values.seaweedfs.mountPort }}" envFrom: null - image: {{ .Values.container.registry }}/openmined/grid-seaweedfs:{{ .Values.container.syft_version }} + image: {{ .Values.syft.registry }}/openmined/grid-seaweedfs:{{ .Values.syft.version }} lifecycle: null livenessProbe: null name: container-0 diff --git a/packages/grid/helm/syft/values.yaml b/packages/grid/helm/syft/values.yaml index 1be7f0f655a..7faf72c92f4 100644 --- a/packages/grid/helm/syft/values.yaml +++ b/packages/grid/helm/syft/values.yaml @@ -25,9 +25,9 @@ seaweedfs: s3Port: 8333 s3RootUser: "admin" -container: +syft: registry: "docker.io" - syft_version: 0.8.4-beta.3 + version: 0.8.4-beta.3 node: settings: From a835d0a0e0af98dda271982eb63ddcef9948b463 Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Thu, 21 Dec 2023 12:56:40 +0530 Subject: [PATCH 05/13] [helm] cleanup mongo --- .../grid/helm/syft/templates/backend-statefulset.yaml | 6 +++--- .../grid/helm/syft/templates/mongo-statefulset.yaml | 2 +- packages/grid/helm/syft/values.yaml | 10 ++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/grid/helm/syft/templates/backend-statefulset.yaml b/packages/grid/helm/syft/templates/backend-statefulset.yaml index 0777795b42f..624af294aec 100644 --- a/packages/grid/helm/syft/templates/backend-statefulset.yaml +++ b/packages/grid/helm/syft/templates/backend-statefulset.yaml @@ -28,11 +28,11 @@ spec: command: null env: - name: MONGO_PORT - value: {{ .Values.db.mongo.settings.mongoPort }} + value: {{ .Values.mongo.port }} - name: MONGO_HOST - value: {{ .Values.db.mongo.settings.mongoHost }} + value: {{ .Values.mongo.host }} - name: MONGO_USERNAME - value: {{ .Values.db.mongo.settings.mongoUsername }} + value: {{ .Values.mongo.username }} - name: MONGO_PASSWORD valueFrom: secretKeyRef: diff --git a/packages/grid/helm/syft/templates/mongo-statefulset.yaml b/packages/grid/helm/syft/templates/mongo-statefulset.yaml index eaeaeaac3ab..add3a6a4484 100644 --- a/packages/grid/helm/syft/templates/mongo-statefulset.yaml +++ b/packages/grid/helm/syft/templates/mongo-statefulset.yaml @@ -28,7 +28,7 @@ spec: command: null env: - name: MONGO_INITDB_ROOT_USERNAME - value: {{ .Values.db.mongo.settings.mongoUsername }} + value: {{ .Values.mongo.username }} - name: MONGO_INITDB_ROOT_PASSWORD valueFrom: secretKeyRef: diff --git a/packages/grid/helm/syft/values.yaml b/packages/grid/helm/syft/values.yaml index 7faf72c92f4..ae1e4d7ca85 100644 --- a/packages/grid/helm/syft/values.yaml +++ b/packages/grid/helm/syft/values.yaml @@ -10,12 +10,10 @@ secrets: configuration: devmode: false -db: - mongo: - settings: - mongoPort: "'27017'" - mongoHost: "mongo" - mongoUsername: "root" +mongo: + port: "'27017'" + host: "mongo" + username: "root" seaweedfs: # SeaweedFS config From 452f6054d2a6d467474858a8e353c7b5e09a1bf7 Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Thu, 21 Dec 2023 14:25:08 +0530 Subject: [PATCH 06/13] [helm] cleanup labels --- packages/grid/helm/manifests.yaml | 748 ------------------ .../templates/backend-headless-service.yaml | 5 +- .../{syft-secret.yaml => backend-secret.yaml} | 4 + .../helm/syft/templates/backend-service.yaml | 5 +- .../syft/templates/backend-statefulset.yaml | 10 +- .../syft/templates/frontend-deployment.yaml | 7 +- .../helm/syft/templates/frontend-service.yaml | 5 +- .../templates/grid-stack-ingress-ingress.yaml | 5 + .../grid-stack-ingress-tls-ingress.yaml | 5 + .../templates/mongo-headless-service.yaml | 5 +- .../helm/syft/templates/mongo-secret.yaml | 4 + .../helm/syft/templates/mongo-service.yaml | 5 +- .../syft/templates/mongo-statefulset.yaml | 10 +- .../helm/syft/templates/proxy-deployment.yaml | 7 +- .../helm/syft/templates/proxy-service.yaml | 5 +- .../templates/seaweedfs-headless-service.yaml | 5 +- .../syft/templates/seaweedfs-service.yaml | 5 +- .../syft/templates/seaweedfs-statefulset.yaml | 10 +- 18 files changed, 68 insertions(+), 782 deletions(-) delete mode 100644 packages/grid/helm/manifests.yaml rename packages/grid/helm/syft/templates/{syft-secret.yaml => backend-secret.yaml} (84%) diff --git a/packages/grid/helm/manifests.yaml b/packages/grid/helm/manifests.yaml deleted file mode 100644 index 19c2c9a8ca5..00000000000 --- a/packages/grid/helm/manifests.yaml +++ /dev/null @@ -1,748 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: backend - name: backend -spec: - externalIPs: null - ports: - - name: port-0 - port: 80 - protocol: TCP - targetPort: 80 - selector: - app.kubernetes.io/component: backend - app.kubernetes.io/name: devspace-app - type: ClusterIP ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: backend - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - name: backend -spec: - podManagementPolicy: OrderedReady - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/component: backend - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - serviceName: backend-headless - template: - metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: backend - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - spec: - affinity: null - containers: - - args: null - command: null - env: - - name: MONGO_PORT - value: '27017' - - name: MONGO_HOST - value: mongo - - name: MONGO_USERNAME - value: root - - name: MONGO_PASSWORD - value: example - - name: SERVICE_NAME - value: backend - - name: RELEASE - value: production - - name: VERSION - value: 0.8.3-beta.4 - - name: VERSION_HASH - value: unknown - - name: NODE_TYPE - value: domain - - name: NODE_NAME - value: default_node_name - - name: NODE_SIDE_TYPE - value: high - - name: STACK_API_KEY - value: changeme - - name: PORT - value: '80' - - name: IGNORE_TLS_ERRORS - value: 'False' - - name: HTTP_PORT - value: '80' - - name: HTTPS_PORT - value: '443' - - name: CONTAINER_HOST - value: k8s - - name: TRACE - value: 'False' - - name: JAEGER_HOST - value: localhost - - name: JAEGER_PORT - value: '14268' - - name: DEV_MODE - value: 'False' - - name: DOMAIN_CONNECTION_PORT - value: '3030' - - name: ENABLE_OBLV - value: 'false' - - name: DEFAULT_ROOT_EMAIL - value: info@openmined.org - - name: DEFAULT_ROOT_PASSWORD - value: changethis - envFrom: null - image: docker.io/openmined/grid-backend:0.8.3-beta.4 - lifecycle: null - livenessProbe: null - name: container-0 - readinessProbe: null - securityContext: null - startupProbe: null - volumeDevices: null - volumeMounts: - - mountPath: /root/data/creds/ - name: credentials-data - readOnly: false - subPath: credentials-data - dnsConfig: null - ephemeralContainers: null - hostAliases: null - imagePullSecrets: null - initContainers: null - nodeName: null - nodeSelector: null - overhead: null - readinessGates: null - securityContext: null - terminationGracePeriodSeconds: 5 - tolerations: null - topologySpreadConstraints: null - volumes: null - volumeClaimTemplates: - - metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: backend - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - name: credentials-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: backend - name: backend-headless -spec: - clusterIP: None - ports: - - name: web - port: 80 - selector: - app.kubernetes.io/component: backend - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: frontend - name: frontend -spec: - externalIPs: null - ports: - - name: port-0 - port: 80 - protocol: TCP - targetPort: 80 - selector: - app.kubernetes.io/component: frontend - app.kubernetes.io/name: devspace-app - type: ClusterIP ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: frontend - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - name: frontend -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/component: frontend - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - strategy: - type: Recreate - template: - metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: frontend - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - spec: - affinity: null - containers: - - args: null - command: null - env: - - name: VERSION - value: 0.8.3-beta.4 - - name: VERSION_HASH - value: unknown - - name: NODE_TYPE - value: domain - - name: NEXT_PUBLIC_API_URL - value: ${NEXT_PUBLIC_API_URL} - envFrom: null - image: docker.io/openmined/grid-frontend:0.8.3-beta.4 - lifecycle: null - livenessProbe: null - name: container-0 - readinessProbe: null - securityContext: null - startupProbe: null - volumeDevices: null - volumeMounts: null - dnsConfig: null - ephemeralContainers: null - hostAliases: null - imagePullSecrets: null - initContainers: null - nodeName: null - nodeSelector: null - overhead: null - readinessGates: null - securityContext: null - terminationGracePeriodSeconds: 5 - tolerations: null - topologySpreadConstraints: null - volumes: null - volumeClaimTemplates: null ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - kubernetes.io/ingress.class: '' - name: grid-stack-ingress - namespace: default -spec: - defaultBackend: - service: - name: proxy - port: - number: 80 - rules: - - http: - paths: - - backend: - service: - name: proxy - port: - number: 80 - path: / - pathType: Prefix ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - kubernetes.io/ingress.class: '' - name: grid-stack-ingress-tls -spec: - defaultBackend: - service: - name: proxy - port: - number: 80 - rules: - - host: '' - http: - paths: - - backend: - service: - name: proxy - port: - number: 80 - path: / - pathType: Prefix - tls: - - hosts: - - '' ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: mongo - name: mongo -spec: - externalIPs: null - ports: - - name: port-0 - port: 27017 - protocol: TCP - targetPort: 27017 - selector: - app.kubernetes.io/component: mongo - app.kubernetes.io/name: devspace-app - type: ClusterIP ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: mongo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - name: mongo -spec: - podManagementPolicy: OrderedReady - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/component: mongo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - serviceName: mongo-headless - template: - metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: mongo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - spec: - affinity: null - containers: - - args: null - command: null - env: - - name: MONGO_INITDB_ROOT_USERNAME - value: root - - name: MONGO_INITDB_ROOT_PASSWORD - value: example - envFrom: null - image: mongo:7.0.4 - lifecycle: null - livenessProbe: null - name: container-0 - readinessProbe: null - securityContext: null - startupProbe: null - volumeDevices: null - volumeMounts: - - mountPath: /data/db - name: mongo-data - readOnly: false - subPath: '' - dnsConfig: null - ephemeralContainers: null - hostAliases: null - imagePullSecrets: null - initContainers: null - nodeName: null - nodeSelector: null - overhead: null - readinessGates: null - securityContext: null - terminationGracePeriodSeconds: 5 - tolerations: null - topologySpreadConstraints: null - volumes: null - volumeClaimTemplates: - - metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: mongo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - name: mongo-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Gi ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: mongo - name: mongo-headless -spec: - clusterIP: None - ports: - - name: web - port: 80 - selector: - app.kubernetes.io/component: mongo - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: proxy - name: proxy -spec: - externalIPs: null - ports: - - name: proxy - port: 80 - protocol: TCP - targetPort: 80 - selector: - app.kubernetes.io/component: proxy - app.kubernetes.io/name: devspace-app - type: ClusterIP ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: proxy - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - name: proxy -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/component: proxy - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - strategy: - type: Recreate - template: - metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: proxy - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - spec: - affinity: null - containers: - - args: null - command: null - env: - - name: SERVICE_NAME - value: proxy - envFrom: null - image: traefik:v2.10 - lifecycle: null - livenessProbe: null - name: container-0 - readinessProbe: null - securityContext: null - startupProbe: null - volumeDevices: null - volumeMounts: - - mountPath: /etc/traefik - name: traefik-conf - readOnly: false - dnsConfig: null - ephemeralContainers: null - hostAliases: null - imagePullSecrets: null - initContainers: null - nodeName: null - nodeSelector: null - overhead: null - readinessGates: null - securityContext: null - terminationGracePeriodSeconds: 5 - tolerations: null - topologySpreadConstraints: null - volumes: - - configMap: - name: traefik-main-config - name: traefik-conf - volumeClaimTemplates: null ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: seaweedfs - name: seaweedfs -spec: - externalIPs: null - ports: - - name: port-0 - port: 8888 - protocol: TCP - targetPort: 8888 - - name: port-1 - port: 8333 - protocol: TCP - targetPort: 8333 - - name: port-2 - port: 4001 - protocol: TCP - targetPort: 4001 - selector: - app.kubernetes.io/component: seaweedfs - app.kubernetes.io/name: devspace-app - type: ClusterIP ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: seaweedfs - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - name: seaweedfs -spec: - podManagementPolicy: OrderedReady - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/component: seaweedfs - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - serviceName: seaweedfs-headless - template: - metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: seaweedfs - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - spec: - affinity: null - containers: - - args: null - command: null - env: - - name: S3_VOLUME_SIZE_MB - value: '1024' - - name: S3_ROOT_USER - value: admin - - name: S3_ROOT_PWD - value: admin - - name: S3_PORT - value: '8333' - - name: SEAWEED_MOUNT_PORT - value: '4001' - envFrom: null - image: docker.io/openmined/grid-seaweedfs:0.8.3-beta.4 - lifecycle: null - livenessProbe: null - name: container-0 - readinessProbe: null - securityContext: null - startupProbe: null - volumeDevices: null - volumeMounts: - - mountPath: /etc/seaweedfs/filer.toml - name: seaweedfs-config - readOnly: false - subPath: filer.toml - - mountPath: /etc/seaweedfs/start.sh - name: seaweedfs-config - readOnly: false - subPath: start.sh - - mountPath: /data/blob - name: seaweedfs-data - readOnly: false - subPath: '' - dnsConfig: null - ephemeralContainers: null - hostAliases: null - imagePullSecrets: null - initContainers: null - nodeName: null - nodeSelector: null - overhead: null - readinessGates: null - securityContext: null - terminationGracePeriodSeconds: 5 - tolerations: null - topologySpreadConstraints: null - volumes: - - configMap: - name: seaweedfs-config - name: seaweedfs-config - volumeClaimTemplates: - - metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/component: seaweedfs - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app - name: seaweedfs-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Gi ---- -apiVersion: v1 -data: - filer.toml: | - [leveldb2] - enabled = true - dir = "./filerldb2" - start.sh: | - #! /usr/bin/env bash - - sleep 30 && - echo "s3.configure -access_key ${S3_ROOT_USER} -secret_key ${S3_ROOT_PWD} -user iam -actions Read,Write,List,Tagging,Admin -apply" \ - | weed shell > /dev/null 2>&1 \ - & weed server -s3 -s3.port=${S3_PORT} -master.volumeSizeLimitMB=${S3_VOLUME_SIZE_MB} -kind: ConfigMap -metadata: - name: seaweedfs-config - namespace: default ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - helm.sh/chart: component-chart-0.9.1 - labels: - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: seaweedfs - name: seaweedfs-headless -spec: - clusterIP: None - ports: - - name: web - port: 80 - selector: - app.kubernetes.io/component: seaweedfs - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app ---- -apiVersion: v1 -data: - dynamic.yml: | - http: - services: - frontend: - loadBalancer: - servers: - - url: "http://frontend" - backend: - loadBalancer: - servers: - - url: "http://backend" - seaweedfs: - loadBalancer: - servers: - - url: "http://seaweedfs:8333" - routers: - frontend: - rule: "PathPrefix(`/`)" - entryPoints: - - "web" - service: "frontend" - backend: - rule: "PathPrefix(`/api`) || PathPrefix(`/docs`) || PathPrefix(`/redoc`)" - entryPoints: - - "web" - service: "backend" - blob-storage: - rule: "PathPrefix(`/blob`)" - entryPoints: - - "web" - service: "seaweedfs" - middlewares: - - "blob-storage-url" - - "blob-storage-host" - middlewares: - blob-storage-host: - headers: - customrequestheaders: - Host: seaweedfs:8333 - blob-storage-url: - stripprefix: - prefixes: /blob - forceslash: true - traefik.yml: | - global: - checkNewVersion: false - sendAnonymousUsage: false - - log: - level: INFO - - entryPoints: - web: - address: :80 - ping: - address: :8082 - - ping: - entryPoint: "ping" - - providers: - file: - filename: /etc/traefik/dynamic.yml -kind: ConfigMap -metadata: - name: traefik-main-config - namespace: default diff --git a/packages/grid/helm/syft/templates/backend-headless-service.yaml b/packages/grid/helm/syft/templates/backend-headless-service.yaml index f59d89a905b..47078fb5af2 100644 --- a/packages/grid/helm/syft/templates/backend-headless-service.yaml +++ b/packages/grid/helm/syft/templates/backend-headless-service.yaml @@ -2,8 +2,9 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: backend name: backend-headless spec: clusterIP: None @@ -11,6 +12,6 @@ spec: - name: web port: 80 selector: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: backend app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app diff --git a/packages/grid/helm/syft/templates/syft-secret.yaml b/packages/grid/helm/syft/templates/backend-secret.yaml similarity index 84% rename from packages/grid/helm/syft/templates/syft-secret.yaml rename to packages/grid/helm/syft/templates/backend-secret.yaml index 4ebd8dd69e6..e1da33b2eed 100644 --- a/packages/grid/helm/syft/templates/syft-secret.yaml +++ b/packages/grid/helm/syft/templates/backend-secret.yaml @@ -2,6 +2,10 @@ apiVersion: v1 kind: Secret metadata: name: "syft-default-secret" + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/managed-by: Helm type: Opaque data: {{- if not .Values.configuration.devmode }} diff --git a/packages/grid/helm/syft/templates/backend-service.yaml b/packages/grid/helm/syft/templates/backend-service.yaml index 5326659d116..beaccd7c654 100644 --- a/packages/grid/helm/syft/templates/backend-service.yaml +++ b/packages/grid/helm/syft/templates/backend-service.yaml @@ -2,8 +2,9 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: backend name: backend spec: externalIPs: null @@ -13,6 +14,6 @@ spec: protocol: TCP targetPort: 80 selector: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: backend - app.kubernetes.io/name: devspace-app type: ClusterIP diff --git a/packages/grid/helm/syft/templates/backend-statefulset.yaml b/packages/grid/helm/syft/templates/backend-statefulset.yaml index 624af294aec..e3c5ddf0502 100644 --- a/packages/grid/helm/syft/templates/backend-statefulset.yaml +++ b/packages/grid/helm/syft/templates/backend-statefulset.yaml @@ -2,25 +2,26 @@ apiVersion: apps/v1 kind: StatefulSet metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: backend app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app name: backend spec: podManagementPolicy: OrderedReady replicas: 1 selector: matchLabels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: backend app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app serviceName: backend-headless template: metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: backend app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app spec: affinity: null containers: @@ -128,9 +129,10 @@ spec: volumeClaimTemplates: - metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: backend app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app name: credentials-data spec: accessModes: diff --git a/packages/grid/helm/syft/templates/frontend-deployment.yaml b/packages/grid/helm/syft/templates/frontend-deployment.yaml index 67e76677703..dfc5d39549a 100644 --- a/packages/grid/helm/syft/templates/frontend-deployment.yaml +++ b/packages/grid/helm/syft/templates/frontend-deployment.yaml @@ -2,25 +2,26 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: frontend app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app name: frontend spec: replicas: 1 selector: matchLabels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: frontend app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app strategy: type: Recreate template: metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: frontend app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app spec: affinity: null containers: diff --git a/packages/grid/helm/syft/templates/frontend-service.yaml b/packages/grid/helm/syft/templates/frontend-service.yaml index 6a85a40a31a..ad60d1c4a22 100644 --- a/packages/grid/helm/syft/templates/frontend-service.yaml +++ b/packages/grid/helm/syft/templates/frontend-service.yaml @@ -2,8 +2,9 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: frontend name: frontend spec: externalIPs: null @@ -13,6 +14,6 @@ spec: protocol: TCP targetPort: 80 selector: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: frontend - app.kubernetes.io/name: devspace-app type: ClusterIP diff --git a/packages/grid/helm/syft/templates/grid-stack-ingress-ingress.yaml b/packages/grid/helm/syft/templates/grid-stack-ingress-ingress.yaml index 34a8891d930..623cc65a9d1 100644 --- a/packages/grid/helm/syft/templates/grid-stack-ingress-ingress.yaml +++ b/packages/grid/helm/syft/templates/grid-stack-ingress-ingress.yaml @@ -2,6 +2,11 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: ingress + app.kubernetes.io/managed-by: Helm annotations: kubernetes.io/ingress.class: {{ .Values.ingress.ingressClass }} name: grid-stack-ingress diff --git a/packages/grid/helm/syft/templates/grid-stack-ingress-tls-ingress.yaml b/packages/grid/helm/syft/templates/grid-stack-ingress-tls-ingress.yaml index afcfe0f4b49..5ea90bcd648 100644 --- a/packages/grid/helm/syft/templates/grid-stack-ingress-tls-ingress.yaml +++ b/packages/grid/helm/syft/templates/grid-stack-ingress-tls-ingress.yaml @@ -2,6 +2,11 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: ingress + app.kubernetes.io/managed-by: Helm annotations: kubernetes.io/ingress.class: {{ .Values.ingress.ingressClass }} name: grid-stack-ingress-tls diff --git a/packages/grid/helm/syft/templates/mongo-headless-service.yaml b/packages/grid/helm/syft/templates/mongo-headless-service.yaml index e69be319f7f..bab93cc0d6a 100644 --- a/packages/grid/helm/syft/templates/mongo-headless-service.yaml +++ b/packages/grid/helm/syft/templates/mongo-headless-service.yaml @@ -2,8 +2,9 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: mongo name: mongo-headless spec: clusterIP: None @@ -11,6 +12,6 @@ spec: - name: web port: 80 selector: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: mongo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app diff --git a/packages/grid/helm/syft/templates/mongo-secret.yaml b/packages/grid/helm/syft/templates/mongo-secret.yaml index 1e34a0a3edf..35b27780be5 100644 --- a/packages/grid/helm/syft/templates/mongo-secret.yaml +++ b/packages/grid/helm/syft/templates/mongo-secret.yaml @@ -2,6 +2,10 @@ apiVersion: v1 kind: Secret metadata: name: "mongo-default-secret" + labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/managed-by: Helm type: Opaque data: {{- if not .Values.configuration.devmode }} diff --git a/packages/grid/helm/syft/templates/mongo-service.yaml b/packages/grid/helm/syft/templates/mongo-service.yaml index c0af82c7641..8880d73378c 100644 --- a/packages/grid/helm/syft/templates/mongo-service.yaml +++ b/packages/grid/helm/syft/templates/mongo-service.yaml @@ -2,8 +2,9 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: mongo name: mongo spec: externalIPs: null @@ -13,6 +14,6 @@ spec: protocol: TCP targetPort: 27017 selector: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: mongo - app.kubernetes.io/name: devspace-app type: ClusterIP diff --git a/packages/grid/helm/syft/templates/mongo-statefulset.yaml b/packages/grid/helm/syft/templates/mongo-statefulset.yaml index add3a6a4484..5a916b0daf4 100644 --- a/packages/grid/helm/syft/templates/mongo-statefulset.yaml +++ b/packages/grid/helm/syft/templates/mongo-statefulset.yaml @@ -2,25 +2,26 @@ apiVersion: apps/v1 kind: StatefulSet metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: mongo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app name: mongo spec: podManagementPolicy: OrderedReady replicas: 1 selector: matchLabels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: mongo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app serviceName: mongo-headless template: metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: mongo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app spec: affinity: null containers: @@ -65,9 +66,10 @@ spec: volumeClaimTemplates: - metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: mongo app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app name: mongo-data spec: accessModes: diff --git a/packages/grid/helm/syft/templates/proxy-deployment.yaml b/packages/grid/helm/syft/templates/proxy-deployment.yaml index 8a561b2d953..3ef7c1717cc 100644 --- a/packages/grid/helm/syft/templates/proxy-deployment.yaml +++ b/packages/grid/helm/syft/templates/proxy-deployment.yaml @@ -2,25 +2,26 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: proxy app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app name: proxy spec: replicas: 1 selector: matchLabels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: proxy app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app strategy: type: Recreate template: metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: proxy app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app spec: affinity: null containers: diff --git a/packages/grid/helm/syft/templates/proxy-service.yaml b/packages/grid/helm/syft/templates/proxy-service.yaml index 18da1e72287..1c289f3e0be 100644 --- a/packages/grid/helm/syft/templates/proxy-service.yaml +++ b/packages/grid/helm/syft/templates/proxy-service.yaml @@ -2,8 +2,9 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: proxy name: proxy spec: externalIPs: null @@ -13,6 +14,6 @@ spec: protocol: TCP targetPort: 80 selector: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: proxy - app.kubernetes.io/name: devspace-app type: ClusterIP diff --git a/packages/grid/helm/syft/templates/seaweedfs-headless-service.yaml b/packages/grid/helm/syft/templates/seaweedfs-headless-service.yaml index d6baa9e0a3d..03320064af4 100644 --- a/packages/grid/helm/syft/templates/seaweedfs-headless-service.yaml +++ b/packages/grid/helm/syft/templates/seaweedfs-headless-service.yaml @@ -3,8 +3,9 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: seaweedfs name: seaweedfs-headless spec: clusterIP: None @@ -12,7 +13,7 @@ spec: - name: web port: 80 selector: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: seaweedfs app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app {{ end }} diff --git a/packages/grid/helm/syft/templates/seaweedfs-service.yaml b/packages/grid/helm/syft/templates/seaweedfs-service.yaml index c6c26b0a589..9343112b019 100644 --- a/packages/grid/helm/syft/templates/seaweedfs-service.yaml +++ b/packages/grid/helm/syft/templates/seaweedfs-service.yaml @@ -3,8 +3,9 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: seaweedfs name: seaweedfs spec: externalIPs: null @@ -22,7 +23,7 @@ spec: protocol: TCP targetPort: 4001 selector: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: seaweedfs - app.kubernetes.io/name: devspace-app type: ClusterIP {{ end }} diff --git a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml index b92ce5bea21..ffe183e5b85 100644 --- a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml +++ b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml @@ -3,25 +3,26 @@ apiVersion: apps/v1 kind: StatefulSet metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: seaweedfs app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app name: seaweedfs spec: podManagementPolicy: OrderedReady replicas: 1 selector: matchLabels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: seaweedfs app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app serviceName: seaweedfs-headless template: metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/component: seaweedfs app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app spec: affinity: null containers: @@ -83,9 +84,10 @@ spec: volumeClaimTemplates: - metadata: labels: + app.kubernetes.io/name: {{ .Chart.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} app.kubernetes.io/component: seaweedfs app.kubernetes.io/managed-by: Helm - app.kubernetes.io/name: devspace-app name: seaweedfs-data spec: accessModes: From 50dfabb6628fec6aa6c8b4782ba43b553c965c5f Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Thu, 21 Dec 2023 16:22:42 +0530 Subject: [PATCH 07/13] [ci] syft k8s build and push seaweedfs --- .github/workflows/cd-syft-dev.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd-syft-dev.yml b/.github/workflows/cd-syft-dev.yml index 5cb8235f423..f0dc6a7cc32 100644 --- a/.github/workflows/cd-syft-dev.yml +++ b/.github/workflows/cd-syft-dev.yml @@ -90,7 +90,9 @@ jobs: - name: Set Grid package version id: grid shell: bash - run: echo "GRID_VERSION=$(python packages/grid/VERSION)" >> $GITHUB_OUTPUT + run: | + echo "GRID_VERSION=$(python packages/grid/VERSION)" >> $GITHUB_OUTPUT + echo "SEAWEEDFS_version=$(grep 'SEAWEEDFS_VERSION' packages/grid/default.env | cut -d '=' -f2)" >> $GITHUB_OUTPUT - name: Build and push `grid-backend` image to registry uses: docker/build-push-action@v5 @@ -116,6 +118,19 @@ jobs: ${{ secrets.ACR_SERVER }}/openmined/grid-frontend:${{ steps.grid.outputs.GRID_VERSION }} target: grid-ui-development + - name: Build and push `grid-seaweedfs` image to registry + uses: docker/build-push-action@v5 + with: + context: ./packages/grid/seaweedfs + file: ./packages/grid/seaweedfs/seaweedfs.dockerfile + build-args: | + SEAWEEDFS_VERSION=${{ steps.grid.outputs.SEAWEEDFS_VERSION }} + push: true + tags: | + ${{ secrets.ACR_SERVER }}/openmined/grid-seaweedfs:dev + ${{ secrets.ACR_SERVER }}/openmined/grid-seaweedfs:dev-${{ github.sha }} + ${{ secrets.ACR_SERVER }}/openmined/grid-seaweedfs:${{ steps.grid.outputs.GRID_VERSION }} + - name: Build Helm Chart & Copy to infra if: github.ref == 'refs/heads/dev' || github.event.inputs.deploy-helm == 'true' shell: bash From aeed49eae484db556f7561033304e37ad714dc65 Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Thu, 21 Dec 2023 16:47:55 +0530 Subject: [PATCH 08/13] [ci] fix typo --- .github/workflows/cd-syft-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd-syft-dev.yml b/.github/workflows/cd-syft-dev.yml index f0dc6a7cc32..d067ecc5db4 100644 --- a/.github/workflows/cd-syft-dev.yml +++ b/.github/workflows/cd-syft-dev.yml @@ -92,7 +92,7 @@ jobs: shell: bash run: | echo "GRID_VERSION=$(python packages/grid/VERSION)" >> $GITHUB_OUTPUT - echo "SEAWEEDFS_version=$(grep 'SEAWEEDFS_VERSION' packages/grid/default.env | cut -d '=' -f2)" >> $GITHUB_OUTPUT + echo "SEAWEEDFS_VERSION=$(grep 'SEAWEEDFS_VERSION' packages/grid/default.env | cut -d '=' -f2)" >> $GITHUB_OUTPUT - name: Build and push `grid-backend` image to registry uses: docker/build-push-action@v5 From ab071c1518a86593805200a421fd1f8222dbcde7 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 21 Dec 2023 17:10:06 +0530 Subject: [PATCH 09/13] fix devspace k8s tests --- packages/grid/devspace.yaml | 4 ++-- scripts/get_k8s_secret_ci.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/grid/devspace.yaml b/packages/grid/devspace.yaml index 46f852fc36c..12d1adf4fe1 100644 --- a/packages/grid/devspace.yaml +++ b/packages/grid/devspace.yaml @@ -66,9 +66,9 @@ deployments: chart: name: ./helm/syft values: - container: + syft: registry: ${CONTAINER_REGISTRY} - syft_version: "dev-latest" + version: "dev-latest" node: settings: nodeName: ${NODE_NAME} diff --git a/scripts/get_k8s_secret_ci.sh b/scripts/get_k8s_secret_ci.sh index 8974780d87f..11d5bb9d767 100644 --- a/scripts/get_k8s_secret_ci.sh +++ b/scripts/get_k8s_secret_ci.sh @@ -1,6 +1,6 @@ #!/bin/bash -export SYFT_LOGIN_testgateway1_PASSWORD=$(kubectl --context=k3d-testgateway1 get secret syftsecret -n testgateway1 \ +export SYFT_LOGIN_testgateway1_PASSWORD=$(kubectl --context=k3d-testgateway1 get secret syft-default-secret -n testgateway1 \ -o jsonpath='{.data.defaultRootPassword}' | base64 --decode) -export SYFT_LOGIN_testdomain1_PASSWORD=$(kubectl get --context=k3d-testdomain1 secret syftsecret -n testdomain1 \ +export SYFT_LOGIN_testdomain1_PASSWORD=$(kubectl get --context=k3d-testdomain1 secret syft-default-secret -n testdomain1 \ -o jsonpath='{.data.defaultRootPassword}' | base64 --decode) \ No newline at end of file From 7e011dee6c2a087668d43084f152a6655641bb21 Mon Sep 17 00:00:00 2001 From: Yash Gorana Date: Thu, 21 Dec 2023 16:51:17 +0530 Subject: [PATCH 10/13] [ci] follow conventions --- .../helm/syft/templates/backend-secret.yaml | 17 +++++++++-------- .../syft/templates/backend-statefulset.yaml | 4 ++-- .../grid/helm/syft/templates/mongo-secret.yaml | 7 +++---- .../helm/syft/templates/mongo-statefulset.yaml | 2 +- .../helm/syft/templates/seaweedfs-secret.yaml | 7 +++---- .../syft/templates/seaweedfs-statefulset.yaml | 2 +- 6 files changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/grid/helm/syft/templates/backend-secret.yaml b/packages/grid/helm/syft/templates/backend-secret.yaml index e1da33b2eed..57242b3b1ed 100644 --- a/packages/grid/helm/syft/templates/backend-secret.yaml +++ b/packages/grid/helm/syft/templates/backend-secret.yaml @@ -12,14 +12,15 @@ data: {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "syft-default-secret") | default dict }} {{- $secretData := (get $secretObj "data") | default dict }} + {{- $stackApiKeyEnv := (get $secretData "stackApiKey") | default (randAlphaNum 32 | b64enc) }} + {{- $defaultRootPasswordEnv := (get $secretData "defaultRootPassword") | default (randAlphaNum 32 | b64enc) }} - {{- $stackApiKey_env := (get $secretData "stackApiKey") | default (randAlphaNum 32 | b64enc) }} - stackApiKey: {{ $stackApiKey_env | quote }} - - {{- $defaultRootPassword_env := (get $secretData "defaultRootPassword") | default (randAlphaNum 32 | b64enc) }} - defaultRootPassword: {{ $defaultRootPassword_env | quote }} + stackApiKey: {{ $stackApiKeyEnv | quote }} + defaultRootPassword: {{ $defaultRootPasswordEnv | quote }} {{- else }} - stackApiKey: {{ "changeme" | b64enc }} # Base64-encoded "changeme" - defaultRootPassword: {{ "changethis" | b64enc}} # Base64-encoded "changethis" - {{- end }} \ No newline at end of file + + stackApiKey: {{ "changeme" | b64enc }} + defaultRootPassword: {{ "changethis" | b64enc}} + + {{- end }} diff --git a/packages/grid/helm/syft/templates/backend-statefulset.yaml b/packages/grid/helm/syft/templates/backend-statefulset.yaml index e3c5ddf0502..6a89bbaa921 100644 --- a/packages/grid/helm/syft/templates/backend-statefulset.yaml +++ b/packages/grid/helm/syft/templates/backend-statefulset.yaml @@ -38,7 +38,7 @@ spec: valueFrom: secretKeyRef: name: {{ .Values.secrets.mongo }} - key: mongo-password-secret + key: rootPassword - name: SERVICE_NAME value: backend - name: RELEASE @@ -93,7 +93,7 @@ spec: valueFrom: secretKeyRef: name: {{ .Values.secrets.seaweedfs }} - key: S3_ROOT_PWD_SECRET + key: s3RootPassword - name: S3_PORT value: "{{ .Values.seaweedfs.s3Port }}" - name: SEAWEED_MOUNT_PORT diff --git a/packages/grid/helm/syft/templates/mongo-secret.yaml b/packages/grid/helm/syft/templates/mongo-secret.yaml index 35b27780be5..a5cd98bf636 100644 --- a/packages/grid/helm/syft/templates/mongo-secret.yaml +++ b/packages/grid/helm/syft/templates/mongo-secret.yaml @@ -12,13 +12,12 @@ data: {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "mongo-default-secret") | default dict }} {{- $secretData := (get $secretObj "data") | default dict }} + {{- $rootPasswordEnv := (get $secretData "rootPassword") | default (randAlphaNum 32 | b64enc) }} - # Helm does not allow hypen character, as a variable name , so we conform to camelCase - {{- $mongoPassSecret_env := (get $secretData "mongo-password-secret") | default (randAlphaNum 32 | b64enc) }} - mongo-password-secret: {{ $mongoPassSecret_env | quote }} + rootPassword: {{ $rootPasswordEnv | quote }} {{- else }} - mongo-password-secret: {{ "example" | b64enc }} # Base64-encoded "example" + rootPassword: {{ "example" | b64enc }} # Base64-encoded "example" {{- end }} \ No newline at end of file diff --git a/packages/grid/helm/syft/templates/mongo-statefulset.yaml b/packages/grid/helm/syft/templates/mongo-statefulset.yaml index 5a916b0daf4..6396f543620 100644 --- a/packages/grid/helm/syft/templates/mongo-statefulset.yaml +++ b/packages/grid/helm/syft/templates/mongo-statefulset.yaml @@ -34,7 +34,7 @@ spec: valueFrom: secretKeyRef: name: {{ .Values.secrets.mongo }} - key: mongo-password-secret + key: rootPassword envFrom: null image: mongo:7.0.4 lifecycle: null diff --git a/packages/grid/helm/syft/templates/seaweedfs-secret.yaml b/packages/grid/helm/syft/templates/seaweedfs-secret.yaml index 15c5528af41..504de8e8561 100644 --- a/packages/grid/helm/syft/templates/seaweedfs-secret.yaml +++ b/packages/grid/helm/syft/templates/seaweedfs-secret.yaml @@ -8,13 +8,12 @@ data: {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "seaweedfs-default-secret") | default dict }} {{- $secretData := (get $secretObj "data") | default dict }} + {{- $s3RootPasswordEnv := (get $secretData "s3RootPassword") | default (randAlphaNum 32 | b64enc) }} - - {{- $S3_ROOT_PWD_SECRET_env := (get $secretData "S3_ROOT_PWD_SECRET") | default (randAlphaNum 32 | b64enc) }} - S3_ROOT_PWD_SECRET: {{ $S3_ROOT_PWD_SECRET_env | quote }} + s3RootPassword: {{ $s3RootPasswordEnv | quote }} {{- else }} - S3_ROOT_PWD_SECRET: {{ "admin" | b64enc }} # Base64-encoded "admin" + s3RootPassword: {{ "admin" | b64enc }} # Base64-encoded "admin" {{- end }} \ No newline at end of file diff --git a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml index ffe183e5b85..97fe64f2682 100644 --- a/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml +++ b/packages/grid/helm/syft/templates/seaweedfs-statefulset.yaml @@ -37,7 +37,7 @@ spec: valueFrom: secretKeyRef: name: {{ .Values.secrets.seaweedfs }} - key: S3_ROOT_PWD_SECRET + key: s3RootPassword - name: S3_PORT value: "{{ .Values.seaweedfs.s3Port }}" - name: SEAWEED_MOUNT_PORT From 77528a3a50ae8b5473abc0bd2b0105a2bef227b8 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Thu, 21 Dec 2023 20:20:55 +0530 Subject: [PATCH 11/13] sample commit to check CI --- packages/syft/src/syft/service/project/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/syft/src/syft/service/project/project.py b/packages/syft/src/syft/service/project/project.py index 2a170af94e0..5dd1007a509 100644 --- a/packages/syft/src/syft/service/project/project.py +++ b/packages/syft/src/syft/service/project/project.py @@ -311,7 +311,7 @@ def accept_by_depositing_result(self, result: Any, force: bool = False): # TODO: To add deny requests, when deny functionality is added def status(self, project: Project) -> Union[Dict, SyftError]: - """Returns the status of the request + """Returns the status of the request. Args: project (Project): Project object to check the status From 3d82e5aa8ef32dac24d4a2bfbec11caf74f062e6 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 22 Dec 2023 09:25:50 +0530 Subject: [PATCH 12/13] minor change to trigger creation of containers in dev environments --- packages/syft/src/syft/service/project/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/syft/src/syft/service/project/project.py b/packages/syft/src/syft/service/project/project.py index 5dd1007a509..b550193b59d 100644 --- a/packages/syft/src/syft/service/project/project.py +++ b/packages/syft/src/syft/service/project/project.py @@ -317,7 +317,7 @@ def status(self, project: Project) -> Union[Dict, SyftError]: project (Project): Project object to check the status Returns: - str: Status of the request + str: Status of the request. During Request status calculation, we do not allow multiple responses """ From cc0fdcfa05741b1dbaacefae72d8e27cf709e3b9 Mon Sep 17 00:00:00 2001 From: rasswanth-s <43314053+rasswanth-s@users.noreply.github.com> Date: Fri, 22 Dec 2023 11:29:10 +0530 Subject: [PATCH 13/13] removed deleted manifest file in cd-syft re-named backend secret to syft secret --- .github/workflows/cd-syft.yml | 4 ++-- .../syft/templates/{backend-secret.yaml => syft-secret.yaml} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename packages/grid/helm/syft/templates/{backend-secret.yaml => syft-secret.yaml} (100%) diff --git a/.github/workflows/cd-syft.yml b/.github/workflows/cd-syft.yml index 91d48b4e837..1e6370d51fb 100644 --- a/.github/workflows/cd-syft.yml +++ b/.github/workflows/cd-syft.yml @@ -395,10 +395,10 @@ jobs: run: | if $is_pre_release; then rm -rf infrastructure/gitops/environments/pre-release/. - cp -R packages/grid/helm/syft/. packages/grid/helm/manifests.yaml infrastructure/gitops/environments/pre_release/ + cp -R packages/grid/helm/syft/. infrastructure/gitops/environments/pre_release/ else rm -rf infrastructure/gitops/environments/stable/. - cp -R packages/grid/helm/syft/. packages/grid/helm/manifests.yaml infrastructure/gitops/environments/stable/ + cp -R packages/grid/helm/syft/. infrastructure/gitops/environments/stable/ fi - name: Commit changes to Infra Repo diff --git a/packages/grid/helm/syft/templates/backend-secret.yaml b/packages/grid/helm/syft/templates/syft-secret.yaml similarity index 100% rename from packages/grid/helm/syft/templates/backend-secret.yaml rename to packages/grid/helm/syft/templates/syft-secret.yaml