디렉토리 구조 및 각 서비스 추가
This commit is contained in:
49
helm/openebs/templates/legacy/cleanup-webhook.yaml
Normal file
49
helm/openebs/templates/legacy/cleanup-webhook.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
{{- if and (.Values.webhook.enabled) (.Values.legacy.enabled) }}
|
||||
# HELM first deletes RBAC, then it tries to delete other resources like SPC and PVC.
|
||||
# We've got validating webhook on SPC and PVC.
|
||||
# But even that the policy of this webhook is Ignore, it fails because the ServiceAccount
|
||||
# does not have permission to access resources like BDC anymore which are used for validation.
|
||||
# Therefore we first need to delete webhook so we can delete the rest of the deployments.
|
||||
{{- $kubeMinor := .Capabilities.KubeVersion.Minor | replace "+" "" }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ template "openebs.fullname" . }}-webhook-cleanup
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-delete-policy": hook-succeeded
|
||||
labels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ template "openebs.fullname" . }}-webhook-cleanup
|
||||
labels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
spec:
|
||||
{{- if .Values.cleanup.image.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.cleanup.image.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "openebs.serviceAccountName" . }}
|
||||
{{- if .Values.webhook.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.webhook.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: kubectl
|
||||
{{- /* bitnami maintains an image for all k8s versions */}}
|
||||
{{- /* see: https://hub.docker.com/r/bitnami/kubectl */}}
|
||||
{{- if .Values.cleanup.image.tag }}
|
||||
image: "{{ .Values.cleanup.image.registry }}{{ .Values.cleanup.image.repository }}:{{ .Values.cleanup.image.tag }}"
|
||||
{{- else }}
|
||||
image: "{{ .Values.cleanup.image.registry }}{{ .Values.cleanup.image.repository }}:{{ .Capabilities.KubeVersion.Major }}.{{ $kubeMinor }}"
|
||||
{{- end }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- >
|
||||
kubectl delete validatingWebhookConfiguration openebs-validation-webhook-cfg || true;
|
||||
restartPolicy: OnFailure
|
||||
{{- end }}
|
||||
@@ -0,0 +1,84 @@
|
||||
{{- if and (.Values.webhook.enabled) (.Values.legacy.enabled) }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "openebs.fullname" . }}-admission-server
|
||||
labels:
|
||||
app: admission-webhook
|
||||
chart: {{ template "openebs.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
component: admission-webhook
|
||||
openebs.io/component-name: admission-webhook
|
||||
openebs.io/version: {{ .Values.release.version }}
|
||||
spec:
|
||||
replicas: {{ .Values.webhook.replicas }}
|
||||
strategy:
|
||||
type: "Recreate"
|
||||
rollingUpdate: null
|
||||
selector:
|
||||
matchLabels:
|
||||
app: admission-webhook
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: admission-webhook
|
||||
name: admission-webhook
|
||||
release: {{ .Release.Name }}
|
||||
openebs.io/version: {{ .Values.release.version }}
|
||||
openebs.io/component-name: admission-webhook
|
||||
spec:
|
||||
{{- if .Values.webhook.hostNetwork }}
|
||||
hostNetwork: true
|
||||
{{- end }}
|
||||
{{- if .Values.webhook.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.webhook.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.webhook.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.webhook.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.webhook.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.webhook.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "openebs.serviceAccountName" . }}
|
||||
containers:
|
||||
- name: admission-webhook
|
||||
image: "{{ .Values.image.repository }}{{ .Values.webhook.image }}:{{ .Values.webhook.imageTag }}"
|
||||
{{- if .Values.webhook.resources }}
|
||||
resources:
|
||||
{{ toYaml .Values.webhook.resources | trimSuffix "\n" | indent 12 }}
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
args:
|
||||
- -alsologtostderr
|
||||
- -v=2
|
||||
- 2>&1
|
||||
env:
|
||||
- name: OPENEBS_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: ADMISSION_WEBHOOK_FAILURE_POLICY
|
||||
value: "{{ .Values.webhook.failurePolicy }}"
|
||||
# Process name used for matching is limited to the 15 characters
|
||||
# present in the pgrep output.
|
||||
# So fullname can't be used here with pgrep (>15 chars).A regular expression
|
||||
# Anchor `^` : matches any string that starts with `admission-serve`
|
||||
# `.*`: matche any string that has `admission-serve` followed by zero or more char
|
||||
# that matches the entire command name has to specified.
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- test `pgrep -c "^admission-serve.*"` = 1
|
||||
initialDelaySeconds: {{ .Values.webhook.healthCheck.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.webhook.healthCheck.periodSeconds }}
|
||||
{{- end }}
|
||||
178
helm/openebs/templates/legacy/deployment-maya-apiserver.yaml
Normal file
178
helm/openebs/templates/legacy/deployment-maya-apiserver.yaml
Normal file
@@ -0,0 +1,178 @@
|
||||
{{- if and (.Values.apiserver.enabled) (.Values.legacy.enabled) }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "openebs.fullname" . }}-apiserver
|
||||
labels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
chart: {{ template "openebs.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
component: apiserver
|
||||
name: maya-apiserver
|
||||
openebs.io/component-name: maya-apiserver
|
||||
openebs.io/version: {{ .Values.release.version }}
|
||||
spec:
|
||||
replicas: {{ .Values.apiserver.replicas }}
|
||||
strategy:
|
||||
type: "Recreate"
|
||||
rollingUpdate: null
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
component: apiserver
|
||||
name: maya-apiserver
|
||||
openebs.io/component-name: maya-apiserver
|
||||
openebs.io/version: {{ .Values.release.version }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "openebs.serviceAccountName" . }}
|
||||
containers:
|
||||
- name: {{ template "openebs.name" . }}-apiserver
|
||||
image: "{{ .Values.image.repository }}{{ .Values.apiserver.image }}:{{ .Values.apiserver.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.apiserver.resources }}
|
||||
resources:
|
||||
{{ toYaml .Values.apiserver.resources | trimSuffix "\n" | indent 10 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.apiserver.ports.internalPort }}
|
||||
env:
|
||||
# OPENEBS_IO_KUBE_CONFIG enables maya api service to connect to K8s
|
||||
# based on this config. This is ignored if empty.
|
||||
# This is supported for maya api server version 0.5.2 onwards
|
||||
#- name: OPENEBS_IO_KUBE_CONFIG
|
||||
# value: "/home/ubuntu/.kube/config"
|
||||
# OPENEBS_IO_K8S_MASTER enables maya api service to connect to K8s
|
||||
# based on this address. This is ignored if empty.
|
||||
# This is supported for maya api server version 0.5.2 onwards
|
||||
#- name: OPENEBS_IO_K8S_MASTER
|
||||
# value: "http://172.28.128.3:8080"
|
||||
# OPENEBS_NAMESPACE provides the namespace of this deployment as an
|
||||
# environment variable
|
||||
- name: OPENEBS_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
# OPENEBS_SERVICE_ACCOUNT provides the service account of this pod as
|
||||
# environment variable
|
||||
- name: OPENEBS_SERVICE_ACCOUNT
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.serviceAccountName
|
||||
# OPENEBS_MAYA_POD_NAME provides the name of this pod as
|
||||
# environment variable
|
||||
- name: OPENEBS_MAYA_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
# If OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG is false then OpenEBS default
|
||||
# storageclass and storagepool will not be created.
|
||||
- name: OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG
|
||||
value: "{{ .Values.defaultStorageConfig.enabled }}"
|
||||
# OPENEBS_IO_INSTALL_DEFAULT_CSTOR_SPARSE_POOL decides whether default cstor sparse pool should be
|
||||
# configured as a part of openebs installation.
|
||||
# If "true" a default cstor sparse pool will be configured, if "false" it will not be configured.
|
||||
# This value takes effect only if OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG
|
||||
# is set to true
|
||||
- name: OPENEBS_IO_INSTALL_DEFAULT_CSTOR_SPARSE_POOL
|
||||
value: "{{ .Values.apiserver.sparse.enabled }}"
|
||||
# OPENEBS_IO_CSTOR_TARGET_DIR can be used to specify the hostpath
|
||||
# to be used for saving the shared content between the side cars
|
||||
# of cstor volume pod.
|
||||
# The default path used is /var/openebs/sparse
|
||||
- name: OPENEBS_IO_CSTOR_TARGET_DIR
|
||||
value: "{{ .Values.ndm.sparse.path }}"
|
||||
# OPENEBS_IO_CSTOR_POOL_SPARSE_DIR can be used to specify the hostpath
|
||||
# to be used for saving the shared content between the side cars
|
||||
# of cstor pool pod. This ENV is also used to indicate the location
|
||||
# of the sparse devices.
|
||||
# The default path used is /var/openebs/sparse
|
||||
- name: OPENEBS_IO_CSTOR_POOL_SPARSE_DIR
|
||||
value: "{{ .Values.ndm.sparse.path }}"
|
||||
# OPENEBS_IO_JIVA_POOL_DIR can be used to specify the hostpath
|
||||
# to be used for default Jiva StoragePool loaded by OpenEBS
|
||||
# The default path used is /var/openebs
|
||||
# This value takes effect only if OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG
|
||||
# is set to true
|
||||
- name: OPENEBS_IO_JIVA_POOL_DIR
|
||||
value: "{{ .Values.jiva.defaultStoragePath }}"
|
||||
# OPENEBS_IO_LOCALPV_HOSTPATH_DIR can be used to specify the hostpath
|
||||
# to be used for default openebs-hostpath storageclass loaded by OpenEBS
|
||||
# The default path used is /var/openebs/local
|
||||
# This value takes effect only if OPENEBS_IO_CREATE_DEFAULT_STORAGE_CONFIG
|
||||
# is set to true
|
||||
- name: OPENEBS_IO_LOCALPV_HOSTPATH_DIR
|
||||
value: "{{ .Values.localprovisioner.basePath }}"
|
||||
# OPENEBS_IO_BASE_DIR used by the OpenEBS to store debug information and
|
||||
# so forth that are generated in the course of running OpenEBS containers.
|
||||
- name: OPENEBS_IO_BASE_DIR
|
||||
value: "{{ .Values.varDirectoryPath.baseDir }}"
|
||||
- name: OPENEBS_IO_JIVA_CONTROLLER_IMAGE
|
||||
value: "{{ .Values.image.repository }}{{ .Values.jiva.image }}:{{ .Values.jiva.imageTag }}"
|
||||
- name: OPENEBS_IO_JIVA_REPLICA_IMAGE
|
||||
value: "{{ .Values.image.repository }}{{ .Values.jiva.image }}:{{ .Values.jiva.imageTag }}"
|
||||
- name: OPENEBS_IO_JIVA_REPLICA_COUNT
|
||||
value: "{{ .Values.jiva.replicas }}"
|
||||
- name: OPENEBS_IO_CSTOR_TARGET_IMAGE
|
||||
value: "{{ .Values.image.repository }}{{ .Values.cstor.target.image }}:{{ .Values.cstor.target.imageTag }}"
|
||||
- name: OPENEBS_IO_CSTOR_POOL_IMAGE
|
||||
value: "{{ .Values.image.repository }}{{ .Values.cstor.pool.image }}:{{ .Values.cstor.pool.imageTag }}"
|
||||
- name: OPENEBS_IO_CSTOR_POOL_MGMT_IMAGE
|
||||
value: "{{ .Values.image.repository }}{{ .Values.cstor.poolMgmt.image }}:{{ .Values.cstor.poolMgmt.imageTag }}"
|
||||
- name: OPENEBS_IO_CSTOR_VOLUME_MGMT_IMAGE
|
||||
value: "{{ .Values.image.repository }}{{ .Values.cstor.volumeMgmt.image }}:{{ .Values.cstor.volumeMgmt.imageTag }}"
|
||||
- name: OPENEBS_IO_VOLUME_MONITOR_IMAGE
|
||||
value: "{{ .Values.image.repository }}{{ .Values.policies.monitoring.image }}:{{ .Values.policies.monitoring.imageTag }}"
|
||||
- name: OPENEBS_IO_CSTOR_POOL_EXPORTER_IMAGE
|
||||
value: "{{ .Values.image.repository }}{{ .Values.policies.monitoring.image }}:{{ .Values.policies.monitoring.imageTag }}"
|
||||
- name: OPENEBS_IO_HELPER_IMAGE
|
||||
value: "{{ .Values.image.repository }}{{ .Values.helper.image }}:{{ .Values.helper.imageTag }}"
|
||||
# OPENEBS_IO_ENABLE_ANALYTICS if set to true sends anonymous usage
|
||||
# events to Google Analytics
|
||||
- name: OPENEBS_IO_ENABLE_ANALYTICS
|
||||
value: "{{ .Values.analytics.enabled }}"
|
||||
# OPENEBS_IO_ANALYTICS_PING_INTERVAL can be used to specify the duration (in hours)
|
||||
# for periodic ping events sent to Google Analytics. Default is 24 hours.
|
||||
- name: OPENEBS_IO_ANALYTICS_PING_INTERVAL
|
||||
value: "{{ .Values.analytics.pingInterval }}"
|
||||
- name: OPENEBS_IO_INSTALLER_TYPE
|
||||
value: "charts-helm"
|
||||
# OPENEBS_IO_INSTALL_CRD environment variable is used to enable/disable CRD installation
|
||||
# from Maya API server. By default the CRDs will be installed
|
||||
- name: OPENEBS_IO_INSTALL_CRD
|
||||
value: "{{ .Values.crd.enableInstall }}"
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/mayactl -m $MY_POD_IP version
|
||||
initialDelaySeconds: {{ .Values.apiserver.healthCheck.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.apiserver.healthCheck.periodSeconds }}
|
||||
{{- if .Values.apiserver.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.apiserver.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.apiserver.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.apiserver.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.apiserver.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.apiserver.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
115
helm/openebs/templates/legacy/deployment-maya-provisioner.yaml
Normal file
115
helm/openebs/templates/legacy/deployment-maya-provisioner.yaml
Normal file
@@ -0,0 +1,115 @@
|
||||
{{- if and (.Values.provisioner.enabled) (.Values.legacy.enabled) }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "openebs.fullname" . }}-provisioner
|
||||
labels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
chart: {{ template "openebs.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
component: provisioner
|
||||
name: openebs-provisioner
|
||||
openebs.io/component-name: openebs-provisioner
|
||||
openebs.io/version: {{ .Values.release.version }}
|
||||
spec:
|
||||
replicas: {{ .Values.provisioner.replicas }}
|
||||
strategy:
|
||||
type: "Recreate"
|
||||
rollingUpdate: null
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
component: provisioner
|
||||
name: openebs-provisioner
|
||||
openebs.io/component-name: openebs-provisioner
|
||||
openebs.io/version: {{ .Values.release.version }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "openebs.serviceAccountName" . }}
|
||||
containers:
|
||||
- name: {{ template "openebs.name" . }}-provisioner
|
||||
image: "{{ .Values.image.repository }}{{ .Values.provisioner.image }}:{{ .Values.provisioner.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.provisioner.resources }}
|
||||
resources:
|
||||
{{ toYaml .Values.provisioner.resources | trimSuffix "\n" | indent 10 }}
|
||||
{{- end }}
|
||||
env:
|
||||
# OPENEBS_IO_K8S_MASTER enables openebs provisioner to connect to K8s
|
||||
# based on this address. This is ignored if empty.
|
||||
# This is supported for openebs provisioner version 0.5.2 onwards
|
||||
#- name: OPENEBS_IO_K8S_MASTER
|
||||
# value: "http://10.128.0.12:8080"
|
||||
# OPENEBS_IO_KUBE_CONFIG enables openebs provisioner to connect to K8s
|
||||
# based on this config. This is ignored if empty.
|
||||
# This is supported for openebs provisioner version 0.5.2 onwards
|
||||
#- name: OPENEBS_IO_KUBE_CONFIG
|
||||
# value: "/home/ubuntu/.kube/config"
|
||||
# OPENEBS_NAMESPACE is the namespace that this provisioner will
|
||||
# lookup to find maya api service
|
||||
- name: OPENEBS_NAMESPACE
|
||||
value: "{{ .Release.Namespace }}"
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
# OPENEBS_MAYA_SERVICE_NAME provides the maya-apiserver K8s service name,
|
||||
# that provisioner should forward the volume create/delete requests.
|
||||
# If not present, "maya-apiserver-service" will be used for lookup.
|
||||
# This is supported for openebs provisioner version 0.5.3-RC1 onwards
|
||||
- name: OPENEBS_MAYA_SERVICE_NAME
|
||||
value: "{{ template "openebs.fullname" . }}-apiservice"
|
||||
# LEADER_ELECTION_ENABLED is used to enable/disable leader election. By default
|
||||
# leader election is enabled.
|
||||
- name: LEADER_ELECTION_ENABLED
|
||||
value: "{{ .Values.provisioner.enableLeaderElection }}"
|
||||
# OPENEBS_IO_JIVA_PATCH_NODE_AFFINITY is used to enable/disable setting node affinity
|
||||
# to the jiva replica deployments. Default is `enabled`. The valid values are
|
||||
# `enabled` and `disabled`.
|
||||
- name: OPENEBS_IO_JIVA_PATCH_NODE_AFFINITY
|
||||
value: "{{ .Values.provisioner.patchJivaNodeAffinity }}"
|
||||
# The following values will be set as annotations to the PV object.
|
||||
# Refer : https://github.com/openebs/external-storage/pull/15
|
||||
#- name: OPENEBS_MONITOR_URL
|
||||
# value: "{{ .Values.provisioner.monitorUrl }}"
|
||||
#- name: OPENEBS_MONITOR_VOLKEY
|
||||
# value: "{{ .Values.provisioner.monitorVolumeKey }}"
|
||||
#- name: MAYA_PORTAL_URL
|
||||
# value: "{{ .Values.provisioner.mayaPortalUrl }}"
|
||||
# Process name used for matching is limited to the 15 characters
|
||||
# present in the pgrep output.
|
||||
# So fullname can't be used here with pgrep (>15 chars).A regular expression
|
||||
# that matches the entire command name has to specified.
|
||||
# Anchor `^` : matches any string that starts with `openebs-provis`
|
||||
# `.*`: matches any string that has `openebs-provis` followed by zero or more char
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- test `pgrep "^openebs-provisi.*"` = 1
|
||||
initialDelaySeconds: {{ .Values.provisioner.healthCheck.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.provisioner.healthCheck.periodSeconds }}
|
||||
{{- if .Values.provisioner.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.provisioner.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.provisioner.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.provisioner.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.provisioner.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.provisioner.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,147 @@
|
||||
{{- if and (.Values.snapshotOperator.enabled) (.Values.legacy.enabled) }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "openebs.fullname" . }}-snapshot-operator
|
||||
labels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
chart: {{ template "openebs.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
component: snapshot-operator
|
||||
openebs.io/component-name: openebs-snapshot-operator
|
||||
openebs.io/version: {{ .Values.release.version }}
|
||||
spec:
|
||||
replicas: {{ .Values.snapshotOperator.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
strategy:
|
||||
type: "Recreate"
|
||||
rollingUpdate: null
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
component: snapshot-operator
|
||||
name: openebs-snapshot-operator
|
||||
openebs.io/version: {{ .Values.release.version }}
|
||||
openebs.io/component-name: openebs-snapshot-operator
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "openebs.serviceAccountName" . }}
|
||||
containers:
|
||||
- name: {{ template "openebs.name" . }}-snapshot-controller
|
||||
image: "{{ .Values.image.repository }}{{ .Values.snapshotOperator.controller.image }}:{{ .Values.snapshotOperator.controller.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.snapshotOperator.controller.resources }}
|
||||
resources:
|
||||
{{ toYaml .Values.snapshotOperator.controller.resources | trimSuffix "\n" | indent 10 }}
|
||||
{{- end }}
|
||||
env:
|
||||
# OPENEBS_IO_K8S_MASTER enables openebs snapshot controller to connect to K8s
|
||||
# based on this address. This is ignored if empty.
|
||||
# This is supported for openebs snapshot controller version 0.6-RC1 onwards
|
||||
#- name: OPENEBS_IO_K8S_MASTER
|
||||
# value: "http://10.128.0.12:8080"
|
||||
# OPENEBS_IO_KUBE_CONFIG enables openebs snapshot controller to connect to K8s
|
||||
# based on this config. This is ignored if empty.
|
||||
# This is supported for openebs snapshot controller version 0.6-RC1 onwards
|
||||
#- name: OPENEBS_IO_KUBE_CONFIG
|
||||
# value: "/home/ubuntu/.kube/config"
|
||||
# OPENEBS_NAMESPACE is the namespace that this snapshot controller will
|
||||
# lookup to find maya api service
|
||||
- name: OPENEBS_NAMESPACE
|
||||
value: "{{ .Release.Namespace }}"
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
# OPENEBS_MAYA_SERVICE_NAME provides the maya-apiserver K8s service name,
|
||||
# that snapshot controller should forward the volume snapshot requests.
|
||||
# If not present, "maya-apiserver-service" will be used for lookup.
|
||||
# This is supported for openebs snapshot controller version 0.6-RC1 onwards
|
||||
- name: OPENEBS_MAYA_SERVICE_NAME
|
||||
value: "{{ template "openebs.fullname" . }}-apiservice"
|
||||
# Process name used for matching is limited to the 15 characters
|
||||
# present in the pgrep output.
|
||||
# So fullname can't be used here with pgrep (>15 chars).A regular expression
|
||||
# that matches the entire command name has to specified.
|
||||
# Anchor `^` : matches any string that starts with `snapshot-contro`
|
||||
# `.*`: matches any string that has `snapshot-contro` followed by zero or more char
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- test `pgrep -c "^snapshot-contro.*"` = 1
|
||||
initialDelaySeconds: {{ .Values.snapshotOperator.healthCheck.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.snapshotOperator.healthCheck.periodSeconds }}
|
||||
- name: {{ template "openebs.name" . }}-snapshot-provisioner
|
||||
image: "{{ .Values.image.repository }}{{ .Values.snapshotOperator.provisioner.image }}:{{ .Values.snapshotOperator.provisioner.imageTag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.snapshotOperator.provisioner.resources }}
|
||||
resources:
|
||||
{{ toYaml .Values.snapshotOperator.provisioner.resources | trimSuffix "\n" | indent 10 }}
|
||||
{{- end }}
|
||||
env:
|
||||
# OPENEBS_IO_K8S_MASTER enables openebs snapshot provisioner to connect to K8s
|
||||
# based on this address. This is ignored if empty.
|
||||
# This is supported for openebs snapshot provisioner version 0.6-RC1 onwards
|
||||
#- name: OPENEBS_IO_K8S_MASTER
|
||||
# value: "http://10.128.0.12:8080"
|
||||
# OPENEBS_IO_KUBE_CONFIG enables openebs snapshot provisioner to connect to K8s
|
||||
# based on this config. This is ignored if empty.
|
||||
# This is supported for openebs snapshot provisioner version 0.6-RC1 onwards
|
||||
#- name: OPENEBS_IO_KUBE_CONFIG
|
||||
# value: "/home/ubuntu/.kube/config"
|
||||
# OPENEBS_NAMESPACE is the namespace that this snapshot provisioner will
|
||||
# lookup to find maya api service
|
||||
- name: OPENEBS_NAMESPACE
|
||||
value: "{{ .Release.Namespace }}"
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
# OPENEBS_MAYA_SERVICE_NAME provides the maya-apiserver K8s service name,
|
||||
# that snapshot provisioner should forward the volume snapshot PV requests.
|
||||
# If not present, "maya-apiserver-service" will be used for lookup.
|
||||
# This is supported for openebs snapshot provisioner version 0.6-RC1 onwards
|
||||
- name: OPENEBS_MAYA_SERVICE_NAME
|
||||
value: "{{ template "openebs.fullname" . }}-apiservice"
|
||||
# LEADER_ELECTION_ENABLED is used to enable/disable leader election. By default
|
||||
# leader election is enabled.
|
||||
- name: LEADER_ELECTION_ENABLED
|
||||
value: "{{ .Values.snapshotOperator.enableLeaderElection }}"
|
||||
# Process name used for matching is limited to the 15 characters
|
||||
# present in the pgrep output.
|
||||
# So fullname can't be used here with pgrep (>15 chars).A regular expression
|
||||
# that matches the entire command name has to specified.
|
||||
# Anchor `^` : matches any string that starts with `snapshot-provis`
|
||||
# `.*`: matches any string that has `snapshot-provis` followed by zero or more char
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- test `pgrep -c "^snapshot-provis.*"` = 1
|
||||
initialDelaySeconds: {{ .Values.snapshotOperator.healthCheck.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.snapshotOperator.healthCheck.periodSeconds }}
|
||||
{{- if .Values.snapshotOperator.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.snapshotOperator.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.snapshotOperator.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.snapshotOperator.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.snapshotOperator.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.snapshotOperator.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
23
helm/openebs/templates/legacy/service-maya-apiserver.yaml
Normal file
23
helm/openebs/templates/legacy/service-maya-apiserver.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
{{- if and (.Values.apiserver.enabled) (.Values.legacy.enabled) }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "openebs.fullname" . }}-apiservice
|
||||
labels:
|
||||
app: {{ template "openebs.name" . }}
|
||||
chart: {{ template "openebs.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
openebs.io/component-name: maya-apiserver-svc
|
||||
spec:
|
||||
ports:
|
||||
- name: api
|
||||
port: {{ .Values.apiserver.ports.externalPort }}
|
||||
targetPort: {{ .Values.apiserver.ports.internalPort }}
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: {{ template "openebs.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
component: apiserver
|
||||
sessionAffinity: None
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user