File tree Expand file tree Collapse file tree 7 files changed +25
-4
lines changed Expand file tree Collapse file tree 7 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ helm-clean:
161161
162162# does not work without explicitly specifying the api version
163163# see: https://github.com/helm/helm/issues/6505
164+ # we explicitly set awsCredentials.awsRegion so that we pass the validate stage but the validation still occurs
164165.PHONY : helm-validate
165166helm-validate :
166167 helm template node-tagger \
@@ -171,6 +172,7 @@ helm-validate:
171172 -a monitoring.coreos.com/v1 \
172173 -a apiextensions.k8s.io/v1beta1 \
173174 -a credstash.ouzi.tech/v1 \
175+ --set awsCredentials.awsRegion=us-west-2 \
174176 $(CHART_PATH ) /${CHART_NAME}
175177
176178.PHONY : helm-package
Original file line number Diff line number Diff line change @@ -10,11 +10,10 @@ node-tagger is a Kubernetes operator that applies specified tags to all aws node
1010The controller requires AWS credentials to be set before deploying it. This is accomplished by creating a secret with name ` aws-credentials ` in the controller namespace with the following keys:
1111* AWS_ACCESS_KEY_ID
1212* AWS_SECRET_ACCESS_KEY
13- * AWS_REGION
1413
1514For example running the following will create an appropriate secret in the ` node-tagger ` namespace:
1615```
17- kubectl create secret generic aws-credentials --from-literal=AWS_ACCESS_KEY_ID=access_key --from-literal=AWS_SECRET_ACCESS_KEY=secret_access_key --from-literal=AWS_REGION=us-west-2 -- namespace=node-tagger
16+ kubectl create secret generic aws-credentials --from-literal=AWS_ACCESS_KEY_ID=access_key --from-literal=AWS_SECRET_ACCESS_KEY=secret_access_key --namespace=node-tagger
1817```
1918
2019### Required IAM permissions
Original file line number Diff line number Diff line change 4444 path : /readyz
4545 port : http
4646 env :
47+ - name : AWS_REGION
48+ value : " us-east-1"
4749 - name : SERVICE_MONITOR_NAMESPACE
4850 valueFrom :
4951 fieldRef :
Original file line number Diff line number Diff line change @@ -13,5 +13,4 @@ type: Opaque
1313data :
1414 AWS_ACCESS_KEY_ID : {{ .Values.awsCredentials.awsAccessKeyId | b64enc }}
1515 AWS_SECRET_ACCESS_KEY : {{ .Values.awsCredentials.awsSecretAccessKey | b64enc }}
16- AWS_REGION : {{ .Values.awsCredentials.awsRegion | b64enc }}
1716{{- end -}}
Original file line number Diff line number Diff line change 5555 name : {{ include "node-tagger.credentialsSecretName" . }}
5656{{- end }}
5757 env :
58+ - name : AWS_REGION
59+ value : {{ required "A valid AWS region is required. Please set .Values.awsCredentials.awsRegion" .Values.awsCredentials.awsRegion }}
5860 - name : SERVICE_MONITOR_NAMESPACE
5961 valueFrom :
6062 fieldRef :
Original file line number Diff line number Diff line change 1+ {{- if .Values.podDisruptionBudget -}}
2+ apiVersion : policy/v1beta1
3+ kind : PodDisruptionBudget
4+ metadata :
5+ name : {{ template "node-tagger.fullname" . }}
6+ labels :
7+ {{- include "node-tagger.labels" . | nindent 4 }}
8+ spec :
9+ selector :
10+ matchLabels :
11+ {{- include "node-tagger.selectorLabels" . | nindent 6 }}
12+ {{ toYaml .Values.podDisruptionBudget | indent 2 }}
13+ {{- end -}}
Original file line number Diff line number Diff line change @@ -12,7 +12,12 @@ imagePullSecrets: []
1212nameOverride : " "
1313fullnameOverride : " "
1414
15+ podDisruptionBudget :
16+ minAvailable : 1
17+
1518awsCredentials :
19+ # Region must always be set
20+ awsRegion :
1621 # Whether to mount the secret in the pod
1722 # Set to false if you want to use a different aws auth method e.g. eks iam service account
1823 useSecret : true
@@ -22,7 +27,6 @@ awsCredentials:
2227 secretName :
2328 awsAccessKeyId :
2429 awsSecretAccessKey :
25- awsRegion :
2630
2731# Specifies the tags to apply to the aws node instances
2832tagsToApply :
You can’t perform that action at this time.
0 commit comments