Skip to content

Commit

Permalink
Add node selector, affinity, and tolerations to engine upgrade jobs (#66
Browse files Browse the repository at this point in the history
)

* Add config for tolerations, node selectors, and affinity to jobs

Signed-off-by: Brian Kopp <[email protected]>

* Increment chart version

Signed-off-by: Brian Kopp <[email protected]>

* Remove unnecessary newline

Signed-off-by: Brian Kopp <[email protected]>
  • Loading branch information
BrianKopp authored Sep 18, 2020
1 parent bf86560 commit 739d86f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/anchore-engine/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: anchore-engine
version: 1.9.3
version: 1.9.4
appVersion: 0.8.1
description: Anchore container analysis and policy evaluation engine service
keywords:
Expand Down
14 changes: 13 additions & 1 deletion stable/anchore-engine/templates/engine_upgrade_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,16 @@ spec:
- name: certs
secret:
secretName: {{ . }}
{{- end }}
{{- end }}
{{- with .Values.anchoreEngineUpgradeJob.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.anchoreEngineUpgradeJob.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.anchoreEngineUpgradeJob.tolerations }}
tolerations:
{{ toYaml . | nindent 8 }}
{{- end }}
12 changes: 12 additions & 0 deletions stable/anchore-engine/templates/enterprise_feeds_upgrade_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,16 @@ spec:
secret:
secretName: {{ . }}
{{- end }}
{{- with .Values.anchoreEnterpriseFeedsUpgradeJob.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.anchoreEnterpriseFeedsUpgradeJob.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.anchoreEnterpriseFeedsUpgradeJob.tolerations }}
tolerations:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions stable/anchore-engine/templates/enterprise_upgrade_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,16 @@ spec:
secret:
secretName: {{ . }}
{{- end }}
{{- with .Values.anchoreEnterpriseEngineUpgradeJob.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.anchoreEnterpriseEngineUpgradeJob.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.anchoreEnterpriseEngineUpgradeJob.tolerations }}
tolerations:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions stable/anchore-engine/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,12 @@ anchoreSimpleQueue:
tolerations: []
affinity: {}

# Pod configuration for the helm post-install-hook engine upgrade Job
anchoreEngineUpgradeJob:
nodeSelector: {}
tolerations: []
affinity: {}

# This section is used for configuring anchore enterprise.
anchoreEnterpriseGlobal:
enabled: false
Expand Down Expand Up @@ -628,6 +634,12 @@ anchoreEnterpriseFeeds:
tolerations: []
affinity: {}

# Pod configuration for the helm post-install-hook feeds upgrade Job
anchoreEnterpriseFeedsUpgradeJob:
nodeSelector: {}
tolerations: []
affinity: {}

# Configure the Anchore Enterprise role based access control component.
# This component consists of 2 containers that run as side-cars in the anchore engine api pod.
anchoreEnterpriseRbac:
Expand Down Expand Up @@ -862,6 +874,12 @@ anchore-ui-redis:
# eg redis://:<password>@hostname:6379
externalEndpoint: Null

# Pod configuration for the helm post-install-hook enterprise engine upgrade Job
anchoreEnterpriseEngineUpgradeJob:
nodeSelector: {}
tolerations: []
affinity: {}

# To inject secrets ( credentails data ) via env, rather k8s secrets please set this flag to true.
# This feature will be useful, especially to inject secrets directly into k8s pods from hashicorp vault
# inject_secrets_via_env: false

0 comments on commit 739d86f

Please sign in to comment.