forked from jenkins-infra/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use a distinct deployment template for rsyncd to be able to set its r…
…eplica count independently from mirrorbits deployment
- Loading branch information
1 parent
1822a82
commit b483454
Showing
6 changed files
with
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{{ if and .Values.rsyncd.service.enabled .Values.repository.persistentVolumeClaim.enabled -}} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "mirrorbits.fullname" . }} | ||
labels: | ||
{{ include "mirrorbits.labels" . | indent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount.rsyncd }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "mirrorbits.name" . }}-rsyncd | ||
app.kubernetes.io/instance: {{ .Release.Name }}-rsyncd | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ include "mirrorbits.name" . }}-rsyncd | ||
app.kubernetes.io/instance: {{ .Release.Name }}-rsyncd | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ template "mirrorbits.serviceAccountName" . }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: rsyncd | ||
image: "{{ .Values.image.rsyncd.repository }}:{{ .Values.image.rsyncd.tag }}" | ||
imagePullPolicy: {{ .Values.image.rsyncd.pullPolicy }} | ||
ports: | ||
- name: rsyncd | ||
containerPort: 873 | ||
protocol: TCP | ||
livenessProbe: | ||
tcpSocket: | ||
port: 873 | ||
readinessProbe: | ||
tcpSocket: | ||
port: 873 | ||
resources: | ||
{{- toYaml .Values.rsyncd.resources | nindent 12 }} | ||
volumeMounts: | ||
- name: binary | ||
mountPath: /srv/repo | ||
readOnly: true | ||
|
||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
volumes: | ||
- name: binary | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.repository.name | default (printf "%s-binary" (include "mirrorbits.fullname" .)) }} | ||
{{- 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
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