diff --git a/.github/workflows/cd-syft-dev.yml b/.github/workflows/cd-syft-dev.yml index 61c149ee07c..d067ecc5db4 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 @@ -143,13 +158,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' 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/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/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/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 5c793361884..6a89bbaa921 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: @@ -28,22 +29,22 @@ 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: - name: {{ .Values.secrets.db.mongo.mongosecret }} - key: mongo-password-secret + name: {{ .Values.secrets.mongo }} + key: rootPassword - name: SERVICE_NAME value: backend - 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 @@ -55,7 +56,7 @@ spec: - name: STACK_API_KEY valueFrom: secretKeyRef: - name: {{ .Values.secrets.syft.syftsecret }} + name: {{ .Values.secrets.syft }} key: stackApiKey - name: PORT value: '80' @@ -84,21 +85,21 @@ 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 }} - key: S3_ROOT_PWD_SECRET + name: {{ .Values.secrets.seaweedfs }} + key: s3RootPassword - 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 }} + image: {{ .Values.syft.registry }}/openmined/grid-backend:{{ .Values.syft.version }} lifecycle: null livenessProbe: null name: container-0 @@ -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 a1bdaddb2e6..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: @@ -28,7 +29,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 +37,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/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 new file mode 100644 index 00000000000..a5cd98bf636 --- /dev/null +++ b/packages/grid/helm/syft/templates/mongo-secret.yaml @@ -0,0 +1,23 @@ +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 }} + + {{- $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) }} + + rootPassword: {{ $rootPasswordEnv | quote }} + + {{- else }} + + rootPassword: {{ "example" | b64enc }} # Base64-encoded "example" + + {{- end }} \ No newline at end of file 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 c08a20f57b2..6396f543620 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: @@ -28,12 +29,12 @@ 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: - name: {{ .Values.secrets.db.mongo.mongosecret }} - key: mongo-password-secret + name: {{ .Values.secrets.mongo }} + key: rootPassword envFrom: null image: mongo:7.0.4 lifecycle: null @@ -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/mongo_secrets.yaml b/packages/grid/helm/syft/templates/mongo_secrets.yaml deleted file mode 100644 index ae294033ab6..00000000000 --- a/packages/grid/helm/syft/templates/mongo_secrets.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "mongosecret" -type: Opaque -data: - {{- if not .Values.configuration.devmode }} - - {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "mongosecret") | default dict }} - {{- $secretData := (get $secretObj "data") | default dict }} - - # 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 }} - - {{- else }} - - mongo-password-secret: {{ "example" | b64enc }} # Base64-encoded "example" - - {{- end }} \ No newline at end of file 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-secret.yaml b/packages/grid/helm/syft/templates/seaweedfs-secret.yaml new file mode 100644 index 00000000000..504de8e8561 --- /dev/null +++ b/packages/grid/helm/syft/templates/seaweedfs-secret.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Secret +metadata: + name: "seaweedfs-default-secret" +type: Opaque +data: + {{- if not .Values.configuration.devmode }} + + {{- $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) }} + + s3RootPassword: {{ $s3RootPasswordEnv | quote }} + + {{- else }} + + s3RootPassword: {{ "admin" | b64enc }} # Base64-encoded "admin" + + {{- end }} \ No newline at end of file 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 04753974e17..97fe64f2682 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: @@ -29,20 +30,20 @@ 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.seaweedfsecret }} - key: S3_ROOT_PWD_SECRET + name: {{ .Values.secrets.seaweedfs }} + key: s3RootPassword - 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 }} + image: {{ .Values.syft.registry }}/openmined/grid-seaweedfs:{{ .Values.syft.version }} lifecycle: null livenessProbe: null name: container-0 @@ -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: diff --git a/packages/grid/helm/syft/templates/seaweedfs_secrets.yaml b/packages/grid/helm/syft/templates/seaweedfs_secrets.yaml deleted file mode 100644 index 8ad84b642bd..00000000000 --- a/packages/grid/helm/syft/templates/seaweedfs_secrets.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "seaweedfsecret" -type: Opaque -data: - {{- if not .Values.configuration.devmode }} - - {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "seaweedfsecret") | default dict }} - {{- $secretData := (get $secretObj "data") | default dict }} - - - {{- $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 }} - - {{- else }} - - S3_ROOT_PWD_SECRET: {{ "admin" | b64enc }} # Base64-encoded "admin" - - {{- end }} \ No newline at end of file diff --git a/packages/grid/helm/syft/templates/syft-secret.yaml b/packages/grid/helm/syft/templates/syft-secret.yaml new file mode 100644 index 00000000000..57242b3b1ed --- /dev/null +++ b/packages/grid/helm/syft/templates/syft-secret.yaml @@ -0,0 +1,26 @@ +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 }} + + {{- $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: {{ $stackApiKeyEnv | quote }} + defaultRootPassword: {{ $defaultRootPasswordEnv | quote }} + + {{- else }} + + stackApiKey: {{ "changeme" | b64enc }} + defaultRootPassword: {{ "changethis" | b64enc}} + + {{- end }} diff --git a/packages/grid/helm/syft/templates/syft_secrets.yaml b/packages/grid/helm/syft/templates/syft_secrets.yaml deleted file mode 100644 index b09116df291..00000000000 --- a/packages/grid/helm/syft/templates/syft_secrets.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "syftsecret" -type: Opaque -data: - {{- if not .Values.configuration.devmode }} - - {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "syftsecret") | default dict }} - {{- $secretData := (get $secretObj "data") | default dict }} - - {{- $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 }} - - {{- else }} - stackApiKey: {{ "changeme" | b64enc }} # Base64-encoded "changeme" - defaultRootPassword: {{ "changethis" | b64enc}} # Base64-encoded "changethis" - {{- end }} \ No newline at end of file diff --git a/packages/grid/helm/syft/values.yaml b/packages/grid/helm/syft/values.yaml index fe381869bce..ae1e4d7ca85 100644 --- a/packages/grid/helm/syft/values.yaml +++ b/packages/grid/helm/syft/values.yaml @@ -3,39 +3,29 @@ # 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 -db: - mongo: - settings: - mongoPort: "'27017'" - mongoHost: "mongo" - mongoUsername: "root" +mongo: + port: "'27017'" + host: "mongo" + username: "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: +syft: registry: "docker.io" - syft_version: 0.8.4-beta.3 + version: 0.8.4-beta.3 node: settings: diff --git a/packages/syft/src/syft/service/project/project.py b/packages/syft/src/syft/service/project/project.py index 2a170af94e0..b550193b59d 100644 --- a/packages/syft/src/syft/service/project/project.py +++ b/packages/syft/src/syft/service/project/project.py @@ -311,13 +311,13 @@ 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 Returns: - str: Status of the request + str: Status of the request. During Request status calculation, we do not allow multiple responses """ 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