Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
charts: split properties for webhook and manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Hector Fernandez committed Jul 30, 2020
1 parent 6a7cf1c commit db6b5e6
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 22 deletions.
36 changes: 27 additions & 9 deletions charts/kubefed/charts/controllermanager/templates/deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
kubefed-control-plane: controller-manager
spec:
replicas: {{ .Values.replicaCount }}
replicas: {{ .Values.manager.replicaCount }}
selector:
matchLabels:
kubefed-control-plane: controller-manager
Expand All @@ -22,10 +22,17 @@ spec:
containers:
- command:
- /hyperfed/controller-manager
- "--v={{ .Values.logLevel }}"
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.tag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
- "--v={{ .Values.manager.logLevel }}"
image: "{{ .Values.manager.repository }}/{{ .Values.manager.image }}:{{ .Values.manager.tag }}"
imagePullPolicy: "{{ .Values.manager.imagePullPolicy }}"
name: controller-manager
{{- if .Values.manager.env }}
env:
{{- range $key, $value := .Values.manager.env }}
- name: "{{ $key }}"
value: "{{ $value }}"
{{- end }}
{{- end }}
ports:
- containerPort: 9090
name: metrics
Expand All @@ -37,8 +44,8 @@ spec:
periodSeconds: 3
timeoutSeconds: 3
resources:
{{- if .Values.resources }}
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.manager.resources }}
{{ toYaml .Values.manager.resources | indent 12 }}
{{- end }}
terminationGracePeriodSeconds: 10
---
Expand All @@ -64,15 +71,22 @@ spec:
serviceAccountName: kubefed-admission-webhook
containers:
- name: admission-webhook
image: "{{ .Values.repository }}/{{ .Values.image }}:{{ .Values.tag }}"
imagePullPolicy: "{{ .Values.imagePullPolicy }}"
image: "{{ .Values.webhook.repository }}/{{ .Values.webhook.image }}:{{ .Values.webhook.tag }}"
imagePullPolicy: "{{ .Values.webhook.imagePullPolicy }}"
{{- if .Values.webhook.env }}
env:
{{- range $key, $value := .Values.webhook.env }}
- name: "{{ $key }}"
value: "{{ $value }}"
{{- end }}
{{- end }}
command:
- "/hyperfed/webhook"
- "--secure-port=8443"
- "--audit-log-path=-"
- "--tls-cert-file=/var/serving-cert/tls.crt"
- "--tls-private-key-file=/var/serving-cert/tls.key"
- "--v=8"
- "--v={{ .Values.webhook.logLevel }}"
ports:
- containerPort: 8443
volumeMounts:
Expand All @@ -83,6 +97,10 @@ spec:
path: /healthz
port: 8443
scheme: HTTPS
resources:
{{- if .Values.webhook.resources }}
{{ toYaml .Values.webhook.resources | indent 12 }}
{{- end }}
volumes:
- name: serving-cert
secret:
Expand Down
44 changes: 31 additions & 13 deletions charts/kubefed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@
##
controllermanager:
enabled: true
replicaCount: 2
repository: quay.io/kubernetes-multicluster
image: kubefed
tag: canary
imagePullPolicy: IfNotPresent
logLevel: 2
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 64Mi
clusterAvailableDelay:
clusterUnavailableDelay:
leaderElectLeaseDuration:
Expand All @@ -38,6 +25,37 @@ controllermanager:
SchedulerPreferences:
CrossClusterServiceDiscovery:
FederatedIngress:

controller:
replicaCount: 2
repository: quay.io/kubernetes-multicluster
image: kubefed
tag: canary
imagePullPolicy: IfNotPresent
logLevel: 2
env: {}
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 100m
memory: 64Mi
webhook:
repository: quay.io/kubernetes-multicluster
image: kubefed
tag: canary
imagePullPolicy: IfNotPresent
logLevel: 8
env: {}
resources:
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi


## Configuration global values for all charts
##
Expand Down

0 comments on commit db6b5e6

Please sign in to comment.