Skip to content

Commit

Permalink
Nodeaffinity vk (#486)
Browse files Browse the repository at this point in the history
* fix: adds nodeaffinity to prevent sheduling on VK

* fix: updates helm template for windows

* fix: moves changes to manifest_staging dir

* docs: adds configurable values for nodeaffinity

* fix: adds nodeaffinity to deployment yamls

* docs: spell check
  • Loading branch information
nilekhc committed Apr 23, 2021
1 parent 5fed2b9 commit dead813
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ The following table lists the configurable parameters of the csi-secrets-store-p
| `linux.healthzTimeout` | RPC timeout for health check | `"5s"` |
| `linux.volumes` | Additional volumes to create for the KeyVault provider pods. | `[]` |
| `linux.volumeMounts` | Additional volumes to mount on the KeyVault provider pods. | `[]` |
| `linux.affinity` | Configures affinity for provider pods on linux nodes | Match expression `type NotIn virtual-kubelet` |
| `windows.enabled` | Install azure keyvault provider on windows nodes | false |
| `windows.image.repository` | Windows image repository | `mcr.microsoft.com/oss/azure/secrets-store/provider-azure` |
| `windows.image.pullPolicy` | Windows image pull policy | `IfNotPresent` |
Expand All @@ -88,6 +89,7 @@ The following table lists the configurable parameters of the csi-secrets-store-p
| `windows.healthzPath` | path for health check | `"/healthz"` |
| `windows.healthzTimeout` | RPC timeout for health check | `"5s"` |
| `windows.volumes` | Additional volumes to create for the KeyVault provider pods. | `[]` |
| `windows.affinity` | Configures affinity for provider pods on windows nodes | Match expression `type NotIn virtual-kubelet` |
| `windows.volumeMounts` | Additional volumes to mount on the KeyVault provider pods. | `[]` |
| `secrets-store-csi-driver.install` | Install secrets-store-csi-driver with this chart | true |
| `secrets-store-csi-driver.linux.enabled` | Install secrets-store-csi-driver on linux nodes | true |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ spec:
{{- if .Values.windows.volumeMounts }}
{{- toYaml .Values.windows.volumeMounts | nindent 12 }}
{{- end}}
affinity:
{{ toYaml .Values.windows.affinity | indent 8 }}
{{- if .Values.windows.priorityClassName }}
priorityClassName: {{ .Values.windows.priorityClassName | quote }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ spec:
{{- if .Values.linux.volumeMounts }}
{{- toYaml .Values.linux.volumeMounts | nindent 12 }}
{{- end}}
affinity:
{{ toYaml .Values.linux.affinity | indent 8 }}
{{- if .Values.linux.priorityClassName }}
priorityClassName: {{ .Values.linux.priorityClassName | quote }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ linux:
healthzTimeout: "5s"
volumes: []
volumeMounts: []
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: type
operator: NotIn
values:
- virtual-kubelet

windows:
image:
Expand Down Expand Up @@ -77,6 +86,15 @@ windows:
healthzTimeout: "5s"
volumes: []
volumeMounts: []
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: type
operator: NotIn
values:
- virtual-kubelet

## Configuration values for the secrets-store-csi-driver dependency.
## ref: https://github.com/kubernetes-sigs/secrets-store-csi-driver/tree/master/charts/secrets-store-csi-driver/README.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ spec:
- name: mountpoint-dir
mountPath: "C:\\var\\lib\\kubelet\\pods"
mountPropagation: HostToContainer
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: type
operator: NotIn
values:
- virtual-kubelet
volumes:
- name: providervol
hostPath:
Expand Down
9 changes: 9 additions & 0 deletions manifest_staging/deployment/provider-azure-installer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ spec:
- name: mountpoint-dir
mountPath: /var/lib/kubelet/pods
mountPropagation: HostToContainer
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: type
operator: NotIn
values:
- virtual-kubelet
volumes:
- name: providervol
hostPath:
Expand Down

0 comments on commit dead813

Please sign in to comment.