Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionally install daemonset to configure nodes in GKE. #167

Merged
merged 1 commit into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Conditionally install daemonset to configure nodes in GKE. The daemon…
…set invokes

a script from the PSO image that is responsible for preparing GKE nodes for use.
At the time of writing this includes installing open-iscsi and multipath-tools
as well as configuring and enabling iscsid.

Conditionally disable csi-snapshotter in GKE. A requirement for Anthos is that
we do not enable any alpha features.
  • Loading branch information
Naveen Neelakantam committed Feb 4, 2020
commit cea7b4939d821b592c8891172566cc9fe850aa60
25 changes: 25 additions & 0 deletions pure-csi/templates/node-configure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Automatic node configuration has only been tested on GKE.
{{ if (.Capabilities.KubeVersion.GitVersion | regexMatch "gke") }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: pso-daemonset
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
name: pso-daemonset
template:
metadata:
labels:
name: pso-daemonset
spec:
hostPID: true
containers:
- name: pso-daemonset
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/bin/sh", "-c", "/node-configure.sh"]
securityContext:
privileged: true
{{ end }}
3 changes: 3 additions & 0 deletions pure-csi/templates/provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /csi
# Google Anthos (which is built on GKE) prohibits alpha snapshotters
{{- if not (.Capabilities.KubeVersion.GitVersion | regexMatch "gke") }}
neelakan79 marked this conversation as resolved.
Show resolved Hide resolved
- name: csi-snapshotter
{{- with .Values.csi.snapshotter.image }}
image: {{ .name | default "quay.io/k8scsi/csi-snapshotter" }}:v1.2.2
Expand All @@ -90,6 +92,7 @@ spec:
volumeMounts:
- name: socket-dir
mountPath: /csi
{{- end }}
# This is the cluster-driver-registrar sidecar that allows helm-install without CRD-hooks for the CSIDriver CRD
# The reason we do not want a crd-hook with helm-chart is to avoid upgrade issues like: https://github.com/helm/helm/issues/4489
{{ if and (eq .Capabilities.KubeVersion.Major "1") (eq .Capabilities.KubeVersion.Minor "13") }}
Expand Down