Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Add service resource for the controller manager #2431

Merged
merged 3 commits into from
Apr 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions charts/catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ chart and their default values.
| `controllerManager.serviceAccount` | Service account | `service-catalog-controller-manager` |
| `controllerManager.apiserverSkipVerify` | Controls whether the API server's TLS verification should be skipped | `true` |
| `controllerManager.enablePrometheusScrape` | Whether the controller will expose metrics on /metrics | `false` |
| `controllerManager.service.type` | Type of service; valid values are `LoadBalancer` , `NodePort` and `ClusterIP` | `ClusterIP` |
| `controllerManager.service.nodePort.securePort` | If service type is `NodePort`, specifies a port in allowable range (e.g. 30000 - 32767 on minikube); The TLS-enabled endpoint will be exposed here | `30444` |
| `controllerManager.service.clusterIP` | If service type is ClusterIP, specify clusterIP as `None` for `headless services` OR specify your own specific IP OR leave blank to let Kubernetes assign a cluster IP | |
| `controllerManager.resources` | Resources allocation (Requests and Limits) | `{requests: {cpu: 100m, memory: 20Mi}, limits: {cpu: 100m, memory: 30Mi}}` |
| `useAggregator` | whether or not to set up the controller-manager to go through the main Kubernetes API server's API aggregator | `true` |
| `rbacEnable` | If true, create & use RBAC resources | `true` |
Expand Down
26 changes: 26 additions & 0 deletions charts/catalog/templates/controller-manager-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
kind: Service
apiVersion: v1
metadata:
name: {{ template "fullname" . }}-controller-manager
labels:
app: {{ template "fullname" . }}-controller-manager
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
type: {{ .Values.controllerManager.service.type }}
{{- if eq .Values.controllerManager.service.type "ClusterIP" }}
{{- if .Values.controllerManager.service.clusterIP }}
clusterIP: {{ .Values.controllerManager.service.clusterIP }}
{{- end }}
{{- end }}
selector:
app: {{ template "fullname" . }}-controller-manager
ports:
- name: secure
protocol: TCP
port: 443
targetPort: 8444
{{- if eq .Values.controllerManager.service.type "NodePort" }}
nodePort: {{ .Values.controllerManager.service.nodePort.securePort }}
{{- end }}
11 changes: 11 additions & 0 deletions charts/catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@ controllerManager:
apiserverSkipVerify: true
# Whether the controller will expose metrics on /metrics
enablePrometheusScrape: false
# Attributes of the controller's service resource
service:
# Type of service; valid values are "LoadBalancer", "NodePort" and "ClusterIP"
# NodePort is useful if deploying on bare metal or hacking locally on
# minikube
type: ClusterIP
# Further configuration for services of type NodePort
nodePort:
# Available port in allowable range (e.g. 30000 - 32767 on minikube)
# The TLS-enabled endpoint will be exposed here
securePort: 30444
# Controller Manager resource requests and limits
# Ref: http://kubernetes.io/docs/user-guide/compute-resources/
resources:
Expand Down