* Add support for SPIRE deployment on OpenShift 4.13 Signed-off-by: Mariusz Sabath <[email protected]> Co-authored-by: Trilok Geer <[email protected]> Co-authored-by: Andrew Block <[email protected]> * Render README Signed-off-by: Mariusz Sabath <[email protected]> * Fix tornjak HTTP/HTTPS port values Signed-off-by: Mariusz Sabath <[email protected]> * Update Frontend README Signed-off-by: Mariusz Sabath <[email protected]> * Add env. variable to Agent to inject node name Signed-off-by: Mariusz Sabath <[email protected]> * Implement Marco's suggestion on CSI CSS version Signed-off-by: Mariusz Sabath <[email protected]> * Add MY_NODE_NAME env. variable to agent for openshift example Signed-off-by: Mariusz Sabath <[email protected]> * Move Openshift examples to dedicated directory Signed-off-by: Mariusz Sabath <[email protected]> * Simplified the install instructions Signed-off-by: Mariusz Sabath <[email protected]> * Suggested changes Signed-off-by: Kevin Fox <[email protected]> * Apply suggestions from code review Co-authored-by: Andrew Block <[email protected]> Signed-off-by: kfox1111 <[email protected]> * Update docs, fix default for backwards compat Signed-off-by: Kevin Fox <[email protected]> * Don't recommend experimental features by default, dont debug helm install by default and explain how to add additional features Signed-off-by: Kevin Fox <[email protected]> * Add notes about openshift to the project for other reviewers. Signed-off-by: Kevin Fox <[email protected]> * Fix incorrectly reverted change Signed-off-by: Kevin Fox <[email protected]> * Correct notes Signed-off-by: Kevin Fox <[email protected]> * Update default Signed-off-by: Kevin Fox <[email protected]> * Fix issue created from bad merge conflict resolution Signed-off-by: kfox1111 <[email protected]> * Update examples/openshift/openshift-values.yaml Co-authored-by: kfox1111 <[email protected]> Signed-off-by: Mariusz Sabath <[email protected]> * Update examples/openshift/openshift-values.yaml Co-authored-by: kfox1111 <[email protected]> Signed-off-by: Mariusz Sabath <[email protected]> * Update examples/openshift/openshift-values.yaml Co-authored-by: kfox1111 <[email protected]> Signed-off-by: Mariusz Sabath <[email protected]> * Update examples/openshift/openshift-values.yaml Co-authored-by: kfox1111 <[email protected]> Signed-off-by: Mariusz Sabath <[email protected]> --------- Signed-off-by: Mariusz Sabath <[email protected]> Signed-off-by: Kevin Fox <[email protected]> Signed-off-by: kfox1111 <[email protected]> Co-authored-by: Trilok Geer <[email protected]> Co-authored-by: Andrew Block <[email protected]> Co-authored-by: Kevin Fox <[email protected]>
132 lines
5.1 KiB
YAML
132 lines
5.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: {{ include "spiffe-csi-driver.fullname" . }}
|
|
namespace: {{ include "spiffe-csi-driver.namespace" . }}
|
|
labels:
|
|
{{- include "spiffe-csi-driver.labels" . | nindent 4 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "spiffe-csi-driver.selectorLabels" . | nindent 6 }}
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "spiffe-csi-driver.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "spiffe-csi-driver.serviceAccountName" . }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.priorityClassName }}
|
|
priorityClassName: {{ .Values.priorityClassName }}
|
|
{{- end }}
|
|
{{- with .Values.initContainers }}
|
|
initContainers:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
# This is the container which runs the SPIFFE CSI driver.
|
|
- name: {{ .Chart.Name }}
|
|
image: {{ template "spire-lib.image" (dict "appVersion" $.Chart.AppVersion "image" .Values.image "global" .Values.global) }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
args: [
|
|
"-workload-api-socket-dir", "/spire-agent-socket",
|
|
"-plugin-name", "{{ .Values.pluginName }}",
|
|
"-csi-socket-path", "/spiffe-csi/csi.sock",
|
|
]
|
|
env:
|
|
# The CSI driver needs a unique node ID. The node name can be
|
|
# used for this purpose.
|
|
- name: MY_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
volumeMounts:
|
|
# The volume containing the SPIRE agent socket. The SPIFFE CSI
|
|
# driver will mount this directory into containers.
|
|
- mountPath: /spire-agent-socket
|
|
name: spire-agent-socket-dir
|
|
readOnly: true
|
|
# The volume that will contain the CSI driver socket shared
|
|
# with the kubelet and the driver registrar.
|
|
- mountPath: /spiffe-csi
|
|
name: spiffe-csi-socket-dir
|
|
# The volume containing mount points for containers.
|
|
- mountPath: {{ .Values.kubeletPath }}/pods
|
|
mountPropagation: Bidirectional
|
|
name: mountpoint-dir
|
|
securityContext:
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop:
|
|
- all
|
|
privileged: true
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
# This container runs the CSI Node Driver Registrar which takes care
|
|
# of all the little details required to register a CSI driver with
|
|
# the kubelet.
|
|
- name: node-driver-registrar
|
|
image: {{ template "spire-lib.image" (dict "image" .Values.nodeDriverRegistrar.image "global" .Values.global) }}
|
|
imagePullPolicy: {{ .Values.nodeDriverRegistrar.image.pullPolicy }}
|
|
args: [
|
|
"-csi-address", "/spiffe-csi/csi.sock",
|
|
"-kubelet-registration-path", "{{ .Values.kubeletPath }}/plugins/{{ .Values.pluginName }}/csi.sock",
|
|
"-health-port", "{{ .Values.healthChecks.port }}"
|
|
]
|
|
volumeMounts:
|
|
# The registrar needs access to the SPIFFE CSI driver socket
|
|
- mountPath: /spiffe-csi
|
|
name: spiffe-csi-socket-dir
|
|
# The registrar needs access to the Kubelet plugin registration
|
|
# directory
|
|
- name: kubelet-plugin-registration-dir
|
|
mountPath: /registration
|
|
ports:
|
|
- containerPort: {{ .Values.healthChecks.port }}
|
|
name: healthz
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: healthz
|
|
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
|
resources:
|
|
{{- toYaml .Values.nodeDriverRegistrar.resources | nindent 12 }}
|
|
volumes:
|
|
- name: spire-agent-socket-dir
|
|
hostPath:
|
|
path: {{ include "spiffe-csi-driver.agent-socket-path" . | dir }}
|
|
type: DirectoryOrCreate
|
|
# This volume is where the socket for kubelet->driver communication lives
|
|
- name: spiffe-csi-socket-dir
|
|
hostPath:
|
|
path: {{ .Values.kubeletPath }}/plugins/{{ .Values.pluginName }}
|
|
type: DirectoryOrCreate
|
|
# This volume is where the SPIFFE CSI driver mounts volumes
|
|
- name: mountpoint-dir
|
|
hostPath:
|
|
path: {{ .Values.kubeletPath }}/pods
|
|
type: Directory
|
|
# This volume is where the node-driver-registrar registers the plugin
|
|
# with kubelet
|
|
- name: kubelet-plugin-registration-dir
|
|
hostPath:
|
|
path: {{ .Values.kubeletPath }}/plugins_registry
|
|
type: Directory
|