This repository has been archived by the owner on Oct 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1022 from johngmyers/nodeselector
Add support for nodeSelector constraint for Helm DaemonSet template
- Loading branch information
Showing
16 changed files
with
230 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
classes: | ||
- name: local-storage | ||
hostDir: /mnt/disks | ||
blockCleanerCommand: | ||
# Do a quick reset of the block device during its cleanup. | ||
# - "/scripts/quick_reset.sh" | ||
# or use dd to zero out block dev in two iterations by uncommenting these lines. | ||
# - "/scripts/dd_zero.sh" | ||
# - "2" | ||
# or run shred utility for 2 iterations. | ||
- "/scripts/shred.sh" | ||
- "2" | ||
# or blkdiscard utility by uncommenting the line below. | ||
# - "/scripts/blkdiscard.sh" | ||
volumeMode: Block | ||
storageClass: true | ||
|
||
daemonset: | ||
nodeSelector: | ||
localVolume: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: v1 | ||
version: 2.0.0 | ||
version: 2.3.0 | ||
description: local provisioner chart | ||
name: provisioner | ||
keywords: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
150 changes: 150 additions & 0 deletions
150
local-volume/helm/test/expected/baremetal-nodeselector.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
--- | ||
# Source: provisioner/templates/provisioner.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: local-provisioner-config | ||
namespace: default | ||
labels: | ||
heritage: "Tiller" | ||
release: "RELEASE-NAME" | ||
chart: provisioner-2.3.0 | ||
data: | ||
storageClassMap: | | ||
local-storage: | ||
hostDir: /mnt/disks | ||
mountDir: /mnt/disks | ||
blockCleanerCommand: | ||
- "/scripts/shred.sh" | ||
- "2" | ||
volumeMode: Block | ||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: DaemonSet | ||
metadata: | ||
name: local-volume-provisioner | ||
namespace: default | ||
labels: | ||
app: local-volume-provisioner | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: local-volume-provisioner | ||
template: | ||
metadata: | ||
labels: | ||
app: local-volume-provisioner | ||
spec: | ||
serviceAccountName: local-storage-admin | ||
nodeSelector: | ||
localVolume: present | ||
containers: | ||
- image: "quay.io/external_storage/local-volume-provisioner:v2.2.0" | ||
name: provisioner | ||
securityContext: | ||
privileged: true | ||
env: | ||
- name: MY_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: MY_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: JOB_CONTAINER_IMAGE | ||
value: "quay.io/external_storage/local-volume-provisioner:v2.2.0" | ||
volumeMounts: | ||
- mountPath: /etc/provisioner/config | ||
name: provisioner-config | ||
readOnly: true | ||
- mountPath: /dev | ||
name: provisioner-dev | ||
- mountPath: /mnt/disks | ||
name: local-storage | ||
mountPropagation: "HostToContainer" | ||
volumes: | ||
- name: provisioner-config | ||
configMap: | ||
name: local-provisioner-config | ||
- name: provisioner-dev | ||
hostPath: | ||
path: /dev | ||
- name: local-storage | ||
hostPath: | ||
path: /mnt/disks | ||
--- | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: local-storage | ||
provisioner: kubernetes.io/no-provisioner | ||
volumeBindingMode: WaitForFirstConsumer | ||
reclaimPolicy: Delete | ||
|
||
--- | ||
# Source: provisioner/templates/provisioner-service-account.yaml | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: local-storage-admin | ||
namespace: default | ||
labels: | ||
heritage: "Tiller" | ||
release: "RELEASE-NAME" | ||
chart: provisioner-2.3.0 | ||
|
||
--- | ||
# Source: provisioner/templates/provisioner-cluster-role-binding.yaml | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: local-storage-provisioner-pv-binding | ||
namespace: default | ||
labels: | ||
heritage: "Tiller" | ||
release: "RELEASE-NAME" | ||
chart: provisioner-2.3.0 | ||
subjects: | ||
- kind: ServiceAccount | ||
name: local-storage-admin | ||
namespace: default | ||
roleRef: | ||
kind: ClusterRole | ||
name: system:persistent-volume-provisioner | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: local-storage-provisioner-node-clusterrole | ||
namespace: default | ||
labels: | ||
heritage: "Tiller" | ||
release: "RELEASE-NAME" | ||
chart: provisioner-2.3.0 | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["get"] | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: local-storage-provisioner-node-binding | ||
namespace: default | ||
labels: | ||
heritage: "Tiller" | ||
release: "RELEASE-NAME" | ||
chart: provisioner-2.3.0 | ||
subjects: | ||
- kind: ServiceAccount | ||
name: local-storage-admin | ||
namespace: default | ||
roleRef: | ||
kind: ClusterRole | ||
name: local-storage-provisioner-node-clusterrole | ||
apiGroup: rbac.authorization.k8s.io | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.