local common(name) = { service: kube.Service(name) { target_pod:: $.deployment.spec.template, }, deployment: kube.Deployment(name) { spec+: { template+: { spec+: { containers_: { common: kube.Container("common") { env: [{name: "PORT", value: "50051"}], ports: [{containerPort: 50051}], securityContext: { readOnlyRootFilesystem: true, runAsNonRoot: true, runAsUser: 10001, }, readinessProbe: { initialDelaySeconds: 20, periodSeconds: 15, exec: { command: [ "/bin/grpc_health_probe", "-addr=:50051", ], }, }, livenessProbe: { initialDelaySeconds: 20, periodSeconds: 15, exec: { command: [ "/bin/grpc_health_probe", "-addr=:50051", ], }, }, }, }, }, }, }, }, };