linkerd2/chart/templates/sp_validator.yaml

89 lines
2.2 KiB
YAML

{{with .Values -}}
---
###
### Service Profile Validator
###
---
kind: Service
apiVersion: v1
metadata:
name: linkerd-sp-validator
namespace: {{.Namespace}}
labels:
{{.ControllerComponentLabel}}: sp-validator
{{.ControllerNamespaceLabel}}: {{.Namespace}}
annotations:
{{.CreatedByAnnotation}}: {{.CliVersion}}
spec:
type: ClusterIP
selector:
{{.ControllerComponentLabel}}: sp-validator
ports:
- name: sp-validator
port: 443
targetPort: sp-validator
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: linkerd-sp-validator
namespace: {{.Namespace}}
labels:
{{.ControllerComponentLabel}}: sp-validator
{{.ControllerNamespaceLabel}}: {{.Namespace}}
annotations:
{{.CreatedByAnnotation}}: {{.CliVersion}}
spec:
replicas: {{.ControllerReplicas}}
selector:
matchLabels:
{{.ControllerComponentLabel}}: sp-validator
template:
metadata:
labels:
{{.ControllerComponentLabel}}: sp-validator
annotations:
{{.CreatedByAnnotation}}: {{.CliVersion}}
spec:
serviceAccountName: linkerd-sp-validator
containers:
- name: sp-validator
image: {{.ControllerImage}}
imagePullPolicy: {{.ImagePullPolicy}}
args:
- "sp-validator"
- "-log-level={{.ControllerLogLevel}}"
ports:
- name: sp-validator
containerPort: 8443
- name: admin-http
containerPort: 9997
volumeMounts:
- name: tls
mountPath: /var/run/linkerd/tls
readOnly: true
livenessProbe:
httpGet:
path: /ping
port: 9997
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 9997
failureThreshold: 7
{{ with .SPValidatorResources -}}
{{- template "resources" . }}
{{ end -}}
securityContext:
runAsUser: {{.ControllerUID}}
volumes:
- name: tls
secret:
secretName: linkerd-sp-validator-tls
{{- if .HighAvailability }}
{{- $local := dict "Label" .ControllerComponentLabel "Component" "sp-validator" }}
{{- include "pod-affinity" $local | nindent 6 }}
{{- end }}
{{end -}}