-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split liveevents deployment manifest
- Loading branch information
1 parent
d193eb7
commit 67d99f4
Showing
5 changed files
with
181 additions
and
21 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
141 changes: 141 additions & 0 deletions
141
charts/port-ocean/templates/deployment-live-events.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,141 @@ | ||
{{- if .Values.liveEvents.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: "{{ include "port-ocean.deploymentName" . }}-live-events" | ||
labels: | ||
{{- include "port-ocean.labels" . | nindent 4 }} | ||
{{- include "port-ocean.liveEventsLabels" . | nindent 4 }} | ||
spec: | ||
strategy: | ||
type: {{ .Values.workload.deployment.rolloutStrategy | default "Recreate" }} | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: "{{ include "port-ocean.deploymentName" . }}-live-events" | ||
{{- include "port-ocean.selectorLabels" . | indent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
app: "{{ include "port-ocean.deploymentName" . }}-live-events" | ||
{{- include "port-ocean.labels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.podServiceAccount.name }} | ||
serviceAccountName: {{ . }} | ||
{{- end }} | ||
terminationGracePeriodSeconds: {{ default 30 .Values.terminationGracePeriodSeconds }} | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
securityContext: | ||
{{- if .Values.podSecurityContext }} | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
{{- end }} | ||
initContainers: | ||
{{- if .Values.extraInitContainers }} | ||
{{- tpl (toYaml .Values.extraInitContainers) . | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ include "port-ocean.containerName" . }} | ||
imagePullPolicy: {{ .Values.imagePullPolicy }} | ||
image: '{{ .Values.imageRegistry }}/port-ocean-{{ .Values.integration.type }}:{{ .Values.integration.version | default "latest" }}' | ||
{{- if .Values.service.enabled }} | ||
securityContext: | ||
{{- if .Values.containerSecurityContext }} | ||
{{- toYaml .Values.containerSecurityContext | nindent 10 }} | ||
{{- end }} | ||
resources: | ||
{{- if .Values.liveEvents.resources }} | ||
{{- toYaml .Values.liveEvents.resources | nindent 10 }} | ||
{{- end }} | ||
ports: | ||
- containerPort: {{.Values.service.port}} | ||
protocol: TCP | ||
{{- end }} | ||
env: | ||
{{- if .Values.selfSignedCertificate.enabled }} | ||
- name: SSL_CERT_FILE | ||
value: /etc/ssl/certs/ca-certificates.crt | ||
- name: REQUESTS_CA_BUNDLE | ||
value: /etc/ssl/certs/ca-certificates.crt | ||
{{- end }} | ||
{{- if .Values.extraEnv }} | ||
{{- tpl (toYaml .Values.extraEnv) . | nindent 10 }} | ||
{{- end }} | ||
envFrom: | ||
- configMapRef: | ||
name: {{ include "port-ocean.configMapName" . }} | ||
{{- include "port-ocean.additionalSecrets" . | nindent 10 }} | ||
volumeMounts: | ||
{{- if .Values.extraVolumeMounts }} | ||
{{- tpl (toYaml .Values.extraVolumeMounts) . | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.selfSignedCertificate.enabled }} | ||
- name: certificates | ||
mountPath: /usr/local/share/ca-certificates/cert.crt | ||
subPath: cert.crt | ||
readOnly: true | ||
{{- end }} | ||
{{- if (.Values.livenessProbe).enabled}} | ||
livenessProbe: | ||
httpGet: | ||
path: /docs | ||
port: {{.Values.service.port}} | ||
initialDelaySeconds: {{ default 30 .Values.livenessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ default 10 .Values.livenessProbe.periodSeconds }} | ||
timeoutSeconds: {{ default 5 .Values.livenessProbe.timeoutSeconds }} | ||
successThreshold: 1 | ||
failureThreshold: {{ default 3 .Values.livenessProbe.failureThreshold }} | ||
{{- end }} | ||
{{- if (.Values.readinessProbe).enabled}} | ||
readinessProbe: | ||
httpGet: | ||
path: /docs | ||
port: {{.Values.service.port}} | ||
initialDelaySeconds: {{ default 30 .Values.readinessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ default 10 .Values.readinessProbe.periodSeconds }} | ||
timeoutSeconds: {{ default 5 .Values.readinessProbe.timeoutSeconds }} | ||
successThreshold: {{ default 2 .Values.readinessProbe.successThreshold }} | ||
failureThreshold: {{ default 3 .Values.readinessProbe.failureThreshold }} | ||
{{- end }} | ||
volumes: | ||
{{- if .Values.extraVolumes }} | ||
{{- tpl (toYaml .Values.extraVolumes) . | nindent 8 }} | ||
{{- end }} | ||
{{- if and .Values.selfSignedCertificate.enabled .Values.selfSignedCertificate.secret.useExistingSecret }} | ||
- name: certificates | ||
projected: | ||
sources: | ||
- secret: | ||
name: {{ .Values.selfSignedCertificate.secret.name }} | ||
items: | ||
- key: {{ .Values.selfSignedCertificate.secret.key }} | ||
path: cert.crt | ||
{{- else if .Values.selfSignedCertificate.enabled }} | ||
- name: certificates | ||
projected: | ||
sources: | ||
- secret: | ||
name: {{ include "port-ocean.selfSignedCertName" . }} | ||
items: | ||
- key: crt | ||
path: cert.crt | ||
{{- end }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
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