diff --git a/helm/data/values/prod/nodeSelector.yaml b/helm/data/values/prod/nodeSelector.yaml new file mode 100644 index 000000000..6965324cc --- /dev/null +++ b/helm/data/values/prod/nodeSelector.yaml @@ -0,0 +1,2 @@ +nodeSelector: + - im-prod-dedicated: true \ No newline at end of file diff --git a/helm/data/values/prod/tolerations.yaml b/helm/data/values/prod/tolerations.yaml new file mode 100644 index 000000000..2ec9b7169 --- /dev/null +++ b/helm/data/values/prod/tolerations.yaml @@ -0,0 +1,5 @@ +tolerations: + - key: im-prod-dedicated + operator: Equal + value: true + effect: NoSchedule diff --git a/skaffold.yaml b/skaffold.yaml index 589da800c..38985e2df 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -14,6 +14,15 @@ # corsAllowOrigins: # - "https://{{ .UI_URL }}" +#.im-prod-tolerations-config: &im-prod-tolerations-config +# key: im-prod-dedicated +# operator: Equal +# value: true +# effect: NoSchedule +# +#.im-prod-node-selector-config: &im-prod-node-selector-config +# im-prod-dedicated: true + apiVersion: skaffold/v4beta6 kind: Config metadata: @@ -45,6 +54,9 @@ deploy: targetPort: 5552 valuesFiles: - helm/data/secrets/{{ .CLASSIFICATION }}/rabbitmq.yaml +# TODO: using value file/s is another option, but we have to create empty one/s for dev, too +# - helm/data/values/{{ .CLASSIFICATION }}/tolerations.yaml +# - helm/data/values/{{ .CLASSIFICATION }}/nodeSelector.yaml - name: im-manager-redis-{{ .ENVIRONMENT }} namespace: instance-manager-{{ .CLASSIFICATION }} @@ -57,6 +69,9 @@ deploy: architecture: standalone auth: enabled: false +# valuesFiles: +# - helm/data/values/{{ .CLASSIFICATION }}/tolerations.yaml +# - helm/data/values/{{ .CLASSIFICATION }}/nodeSelector.yaml - name: im-manager-postgresql-{{ .ENVIRONMENT }} namespace: instance-manager-{{ .CLASSIFICATION }} @@ -69,6 +84,8 @@ deploy: valuesFiles: - helm/data/secrets/{{ .CLASSIFICATION }}/postgresql.yaml - helm/data/values/{{ .CLASSIFICATION }}/postgresql.yaml +# - helm/data/values/{{ .CLASSIFICATION }}/tolerations.yaml +# - helm/data/values/{{ .CLASSIFICATION }}/nodeSelector.yaml - name: im-manager-{{ .ENVIRONMENT }} namespace: instance-manager-{{ .CLASSIFICATION }} @@ -110,6 +127,8 @@ deploy: valuesFiles: - helm/data/secrets/{{ .CLASSIFICATION }}/values.yaml - helm/data/values/{{ .CLASSIFICATION }}/values.yaml +# - helm/data/values/{{ .CLASSIFICATION }}/tolerations.yaml +# - helm/data/values/{{ .CLASSIFICATION }}/nodeSelector.yaml profiles: - name: dev @@ -187,3 +206,41 @@ profiles: name: im-group-implement namespace: implement <<: [ *im-group-chart-config, *im-group-prod-service-account-config ] + +# TODO: can't refer to a release by name here +# TODO: can't use YAML anchor for patching both at the same time +# - op: add +# path: /deploy/helm/releases/0/setValues/tolerations +# value: +# <<: *im-prod-tolerations-config +# - op: add +# path: /deploy/helm/releases/0/setValues/nodeSelector +# value: +# <<: *im-prod-node-selector-config +# +# - op: add +# path: /deploy/helm/releases/1/setValues/tolerations +# value: +# <<: *im-prod-tolerations-config +# - op: add +# path: /deploy/helm/releases/1/setValues/nodeSelector +# value: +# <<: *im-prod-node-selector-config +# +# - op: add +# path: /deploy/helm/releases/2/setValues/primary/tolerations +# value: +# <<: *im-prod-tolerations-config +# - op: add +# path: /deploy/helm/releases/2/setValues/primary/nodeSelector +# value: +# <<: *im-prod-node-selector-config +# +# - op: add +# path: /deploy/helm/releases/3/setValues/tolerations +# value: +# <<: *im-prod-tolerations-config +# - op: add +# path: /deploy/helm/releases/3/setValues/nodeSelector +# value: +# <<: *im-prod-node-selector-config