Skip to content

Commit

Permalink
fix admiraltyio#25: reorg Helm values
Browse files Browse the repository at this point in the history
Signed-off-by: adrienjt <adrienjt@users.noreply.github.com>
  • Loading branch information
adrienjt committed May 15, 2020
1 parent 8e58bc0 commit 4a42757
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 77 deletions.
28 changes: 16 additions & 12 deletions charts/multicluster-scheduler/README.md
Expand Up @@ -108,18 +108,22 @@ Don't forget to label multicluster-scheduler's namespace (e.g., "admiralty") wit
| targets[].key | string | `"config"` | if using a custom kubeconfig secret, override the secret key |
| targets[].context | string | `""` | if using a custom kubeconfig secret, with multiple contexts, override the kubeconfig's current context |
| imagePullSecretName | string | `""` | |
| agent.image.repository | string | `"quay.io/admiralty/multicluster-scheduler-agent"` | |
| agent.controllerManager.image.tag | string | `"0.8.0"` | |
| agent.controllerManager.image.pullPolicy | string | `"IfNotPresent"` | |
| agent.controllerManager.resources | object | `{}` | |
| agent.scheduler.image.repository | string | `"quay.io/admiralty/multicluster-scheduler-scheduler"` | |
| agent.scheduler.image.tag | string | `"0.8.0"` | |
| agent.scheduler.image.pullPolicy | string | `"IfNotPresent"` | |
| agent.scheduler.resources | object | `{}` | |
| agent.nodeSelector | object | `{}` | |
| agent.securityContext | object | `{}` | |
| agent.affinity | object | `{}` | |
| agent.tolerations | array | `[]` | |
| controllerManager.image.repository | string | `"quay.io/admiralty/multicluster-scheduler-agent"` | |
| controllerManager.image.tag | string | `"0.8.0"` | |
| controllerManager.image.pullPolicy | string | `"IfNotPresent"` | |
| controllerManager.resources | object | `{}` | |
| controllerManager.nodeSelector | object | `{}` | |
| controllerManager.securityContext | object | `{}` | |
| controllerManager.affinity | object | `{}` | |
| controllerManager.tolerations | array | `[]` | |
| scheduler.image.repository | string | `"quay.io/admiralty/multicluster-scheduler-scheduler"` | |
| scheduler.image.tag | string | `"0.8.0"` | |
| scheduler.image.pullPolicy | string | `"IfNotPresent"` | |
| scheduler.resources | object | `{}` | |
| scheduler.nodeSelector | object | `{}` | |
| scheduler.securityContext | object | `{}` | |
| scheduler.affinity | object | `{}` | |
| scheduler.tolerations | array | `[]` | |
| postDeleteJob.image.repository | string | `"quay.io/admiralty/multicluster-scheduler-remove-finalizers"` | |
| postDeleteJob.image.tag | string | `"0.8.0"` | |
| postDeleteJob.image.pullPolicy | string | `"IfNotPresent"` | |
Expand Down
48 changes: 24 additions & 24 deletions charts/multicluster-scheduler/templates/deploy.yaml
Expand Up @@ -20,7 +20,7 @@ spec:
spec:
containers:
- name: controller-manager
image: {{ .Values.agent.controllerManager.image.repository }}:{{ default .Chart.AppVersion .Values.agent.controllerManager.image.tag }}
image: {{ .Values.controllerManager.image.repository }}:{{ default .Chart.AppVersion .Values.controllerManager.image.tag }}
ports:
- containerPort: 9443
volumeMounts:
Expand All @@ -36,8 +36,8 @@ spec:
readOnly: true
{{- end }}
{{- end }}
imagePullPolicy: {{ .Values.agent.controllerManager.image.pullPolicy }}
{{- with .Values.resources }}
imagePullPolicy: {{ .Values.controllerManager.image.pullPolicy }}
{{- with .Values.controllerManager.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
serviceAccountName: {{ include "fullname" . }}
Expand All @@ -57,22 +57,22 @@ spec:
items:
- key: {{ default "config" .key }}
path: config
{{- end }}
{{- end }}
{{- with .Values.imagePullSecretName }}
{{- end }}
{{- end }}
{{- with .Values.imagePullSecretName }}
imagePullSecrets:
- name: {{ . }}
{{- end }}
{{- with .Values.nodeSelector }}
{{- with .Values.controllerManager.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.securityContext }}
{{- with .Values.controllerManager.securityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.controllerManager.affinity }}
affinity: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.controllerManager.tolerations }}
tolerations: {{ toYaml . | nindent 8 }}
{{- end }}
---
Expand All @@ -99,7 +99,7 @@ spec:
spec:
containers:
- name: proxy-scheduler
image: {{ .Values.agent.scheduler.image.repository }}:{{ default .Chart.AppVersion .Values.agent.scheduler.image.tag }}
image: {{ .Values.scheduler.image.repository }}:{{ default .Chart.AppVersion .Values.scheduler.image.tag }}
args: ["--config", "/etc/admiralty/proxy-scheduler-config"]
volumeMounts:
- name: config
Expand All @@ -111,8 +111,8 @@ spec:
readOnly: true
{{- end }}
{{- end }}
imagePullPolicy: {{ .Values.agent.scheduler.image.pullPolicy }}
{{- with .Values.agent.scheduler.resources }}
imagePullPolicy: {{ .Values.scheduler.image.pullPolicy }}
{{- with .Values.scheduler.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
serviceAccountName: {{ include "fullname" . }}
Expand All @@ -134,16 +134,16 @@ spec:
imagePullSecrets:
- name: {{ . }}
{{- end }}
{{- with .Values.nodeSelector }}
{{- with .Values.scheduler.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.securityContext }}
{{- with .Values.scheduler.securityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.scheduler.affinity }}
affinity: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.scheduler.tolerations }}
tolerations: {{ toYaml . | nindent 8 }}
{{- end }}
---
Expand All @@ -169,13 +169,13 @@ spec:
spec:
containers:
- name: candidate-scheduler
image: {{ .Values.agent.scheduler.image.repository }}:{{ default .Chart.AppVersion .Values.agent.scheduler.image.tag }}
image: {{ .Values.scheduler.image.repository }}:{{ default .Chart.AppVersion .Values.scheduler.image.tag }}
args: ["--config", "/etc/admiralty/candidate-scheduler-config"]
volumeMounts:
- name: config
mountPath: /etc/admiralty
imagePullPolicy: {{ .Values.agent.scheduler.image.pullPolicy }}
{{- with .Values.agent.scheduler.resources }}
imagePullPolicy: {{ .Values.scheduler.image.pullPolicy }}
{{- with .Values.scheduler.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
serviceAccountName: {{ include "fullname" . }}
Expand All @@ -187,16 +187,16 @@ spec:
imagePullSecrets:
- name: {{ . }}
{{- end }}
{{- with .Values.nodeSelector }}
{{- with .Values.scheduler.nodeSelector }}
nodeSelector: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.securityContext }}
{{- with .Values.scheduler.securityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.scheduler.affinity }}
affinity: {{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.scheduler.tolerations }}
tolerations: {{ toYaml . | nindent 8 }}
{{- end }}
{{- end }}
85 changes: 46 additions & 39 deletions charts/multicluster-scheduler/values.yaml
@@ -1,7 +1,6 @@
nameOverride: ""
fullnameOverride: ""


clusterName: ""
targetSelf: false
targets: []
Expand All @@ -14,44 +13,24 @@ targets: []
# context: "" # (default: the kubeconfig's current context) If the kubeconfig contains multiple contexts, you may want to specify which one to use.
# namespaced: false

webhook:
port: 9443
certDir: /tmp/k8s-webhook-server/serving-certs

#imagePullSecretName: ""

agent:
controllerManager:
image:
repository: "quay.io/admiralty/multicluster-scheduler-agent"
tag: "" # (default: .Chart.AppVersion)
pullPolicy: IfNotPresent
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
scheduler:
image:
repository: "quay.io/admiralty/multicluster-scheduler-scheduler"
tag: "" # (default: .Chart.AppVersion)
pullPolicy: IfNotPresent
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
controllerManager:
image:
repository: "quay.io/admiralty/multicluster-scheduler-agent"
tag: "" # (default: .Chart.AppVersion)
pullPolicy: IfNotPresent
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
securityContext: {}
# capabilities:
Expand All @@ -62,6 +41,31 @@ agent:
affinity: {}
tolerations: []

scheduler:
image:
repository: "quay.io/admiralty/multicluster-scheduler-scheduler"
tag: "" # (default: .Chart.AppVersion)
pullPolicy: IfNotPresent
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
affinity: {}
tolerations: []

postDeleteJob:
image:
Expand Down Expand Up @@ -89,8 +93,11 @@ postDeleteJob:
affinity: {}
tolerations: []

#imagePullSecretName: ""
debug:
controllerManager: false
proxyScheduler: false
candidateScheduler: false

webhook:
port: 9443
certDir: /tmp/k8s-webhook-server/serving-certs
6 changes: 5 additions & 1 deletion test/e2e/argo-workflow/values-cluster1.yaml
Expand Up @@ -3,7 +3,11 @@ targetSelf: true
targets:
- name: c2

agent:
controllerManager:
securityContext:
runAsUser: 1000

scheduler:
securityContext:
runAsUser: 1000

Expand Down
6 changes: 5 additions & 1 deletion test/e2e/argo-workflow/values-cluster2.yaml
@@ -1,6 +1,10 @@
clusterName: c2

agent:
controllerManager:
securityContext:
runAsUser: 1000

scheduler:
securityContext:
runAsUser: 1000

Expand Down

0 comments on commit 4a42757

Please sign in to comment.