diff --git a/Makefile b/Makefile index 63c2674640..2017d6343b 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ docker-build-minikube: docker-build-local minikube image load mk-cdn.tar minikube cache reload - del mk-*.tar + rm -f mk-*.tar run-subgraphs-local: cd demo && go run cmd/all/main.go diff --git a/helm/cosmo/README.md b/helm/cosmo/README.md index 187ce785e7..4189577beb 100644 --- a/helm/cosmo/README.md +++ b/helm/cosmo/README.md @@ -240,6 +240,7 @@ This is the official Helm Chart for WunderGraph Cosmo - The Full Lifecycle Graph | redis.master.persistence.enabled | bool | `true` | | | redis.master.persistence.size | string | `"1Gi"` | | | redis.replica.replicaCount | int | `0` | | +| router.additionalPodLabels | object | `{}` | Add labels to pod resources | | router.commonLabels | object | `{}` | Add labels to all deployed resources | | router.configuration.cdnUrl | string | `"http://cosmo-cdn:8787"` | The URL of the Cosmo CDN. Should be internal to the cluster. | | router.configuration.controlplaneUrl | string | `"http://cosmo-controlplane:3001"` | The URL of the Cosmo Controlplane. Should be internal to the cluster. | diff --git a/helm/cosmo/charts/router/README.md b/helm/cosmo/charts/router/README.md index 5aa13192b5..53ffeea93b 100644 --- a/helm/cosmo/charts/router/README.md +++ b/helm/cosmo/charts/router/README.md @@ -8,7 +8,8 @@ This is the official Helm Chart for the WunderGraph Cosmo Router. | Key | Type | Default | Description | |-----|------|---------|-------------| -| additionalLabels | object | `{}` | Add labels to deployment metadata.labels | +| additionalLabels | object | `{}` | Add labels to deployment (metadata.labels) | +| additionalPodLabels | object | `{}` | Add labels to deployment pod template (spec.template.metadata.labels) | | affinity | object | `{}` | | | autoscaling.enabled | bool | `false` | | | autoscaling.maxReplicas | int | `100` | | diff --git a/helm/cosmo/charts/router/templates/_helpers.tpl b/helm/cosmo/charts/router/templates/_helpers.tpl index 03414280ae..38fc6402ab 100644 --- a/helm/cosmo/charts/router/templates/_helpers.tpl +++ b/helm/cosmo/charts/router/templates/_helpers.tpl @@ -52,6 +52,15 @@ Additional Labels that are just rendered in metadata.labels {{- end }} {{- end }} +{{/* +Additional Pod Labels that are just rendered in metadata.labels +*/}} +{{- define "router.additionalPodLabels" -}} +{{- range $key, $value := .Values.additionalPodLabels }} +{{ $key }}: {{ quote $value }} +{{- end }} +{{- end }} + {{/* Common labels */}} diff --git a/helm/cosmo/charts/router/templates/deployment.yaml b/helm/cosmo/charts/router/templates/deployment.yaml index b6964503de..5a4f935b05 100644 --- a/helm/cosmo/charts/router/templates/deployment.yaml +++ b/helm/cosmo/charts/router/templates/deployment.yaml @@ -30,6 +30,7 @@ spec: {{- end }} labels: {{- include "router.selectorLabels" . | nindent 8 }} + {{- include "router.additionalPodLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/helm/cosmo/charts/router/values.yaml b/helm/cosmo/charts/router/values.yaml index 359a773e3f..010d045f2b 100644 --- a/helm/cosmo/charts/router/values.yaml +++ b/helm/cosmo/charts/router/values.yaml @@ -14,9 +14,12 @@ image: # -- Add labels to all deployed resources commonLabels: {} -# -- Add labels to deployment metadata.labels +# -- Add labels to deployment (metadata.labels) additionalLabels: {} +# -- Add labels to deployment pod template (spec.template.metadata.labels) +additionalPodLabels: {} + deploymentStrategy: {} imagePullSecrets: [] diff --git a/helm/cosmo/values.yaml b/helm/cosmo/values.yaml index c52121cc3b..e823d46a38 100644 --- a/helm/cosmo/values.yaml +++ b/helm/cosmo/values.yaml @@ -252,6 +252,9 @@ router: # -- Add labels to all deployed resources commonLabels: {} + # -- Add labels to pod resources + additionalPodLabels: {} + terminationGracePeriodSeconds: 60 deploymentStrategy: rollingUpdate: