{{- if .Values.ocWorkflow.enabled }} apiVersion: v1 kind: Service metadata: name: oc-workflow-svc labels: app: oc-workflow-svc spec: ports: - name: http port: 8080 protocol: TCP targetPort: 8080 selector: app: oc-workflow type: ClusterIP {{- end }} {{- if and .Values.ocWorkflow.enabled .Values.ocWorkflow.hpa.enabled }} --- # Horizontal Pod Autoscaler apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ .Release.Name }}-oc-workflow spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: {{ .Release.Name }}-oc-workflow minReplicas: {{ .Values.ocWorkflow.hpa.minReplicas }} maxReplicas: {{ .Values.ocWorkflow.hpa.maxReplicas }} metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: {{ .Values.ocWorkflow.hpa.targetCPUUtilizationPercentage }} {{- end }}