-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from accuknox/feature-dev
updated-config
- Loading branch information
Showing
11 changed files
with
141 additions
and
110 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
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 |
---|---|---|
@@ -1,25 +1,31 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: knoxautopolicy | ||
name: {{ .Values.labels.app }} | ||
labels: | ||
deployment: knoxautopolicy | ||
{{ toYaml .Values.labels | indent 4 }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
container: knoxautopolicy | ||
container: {{ .Values.labels.app }} | ||
template: | ||
metadata: | ||
labels: | ||
container: knoxautopolicy | ||
container: {{ .Values.labels.app }} | ||
annotations: | ||
checksum.helm.kubernetes.io/configmap: {{ include (print $.Chart.Name "/templates/dev-config.yaml") . | sha256sum }} | ||
checksum.helm.kubernetes.io/secret: {{ include (print $.Chart.Name "/templates/secret.yaml") . | sha256sum }} | ||
spec: | ||
imagePullSecrets: | ||
containers: | ||
- image: "{{ .Values.knoxautopolicy.image.repository }}:{{ .Values.knoxautopolicy.image.tag | default .Chart.AppVersion }}" | ||
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
name: knoxautopolicy | ||
ports: | ||
- containerPort: 9089 | ||
protocol: TCP | ||
volumeMounts: | ||
{{- toYaml .Values.volumeMounts | nindent 12 }} | ||
volumes: | ||
{{- toYaml .Values.volumes | nindent 12 }} | ||
{{ toYaml .Values.volumeMounts | indent 10 }} | ||
resources: | ||
{{ toYaml .Values.volumes | indent 10 }} | ||
volumes: | ||
{{ toYaml .Values.resources | indent 8 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{- if .Values.autoscaling.enabled }} | ||
apiVersion: autoscaling/v2beta2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ .Values.labels.app }} | ||
labels: | ||
{{ toYaml .Values.labels | indent 4 }} | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ .Values.labels.app }} | ||
minReplicas: {{ .Values.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.autoscaling.maxReplicas }} | ||
metrics: | ||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
{{- end }} | ||
|
||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: knoxautopolicy | ||
name: {{ .Values.labels.app }}-service | ||
labels: | ||
service: knoxautopolicy | ||
{{ toYaml .Values.labels | indent 4 }} | ||
spec: | ||
ports: | ||
- port: 9089 | ||
targetPort: 9089 | ||
protocol: TCP | ||
- port: {{ .Values.service.port }} | ||
targetPort: {{ .Values.service.targetPort }} # Port in microservice | ||
protocol: {{ .Values.service.protocol }} | ||
selector: | ||
container: knoxautopolicy | ||
app: {{ .Values.labels.app }} |
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
Oops, something went wrong.