-
Notifications
You must be signed in to change notification settings - Fork 21
chore: add charts for mcs controller manager #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,23 @@ | ||
| # Patterns to ignore when building packages. | ||
| # This supports shell glob matching, relative path matching, and | ||
| # negation (prefixed with !). Only one pattern per line. | ||
| .DS_Store | ||
| # Common VCS dirs | ||
| .git/ | ||
| .gitignore | ||
| .bzr/ | ||
| .bzrignore | ||
| .hg/ | ||
| .hgignore | ||
| .svn/ | ||
| # Common backup files | ||
| *.swp | ||
| *.bak | ||
| *.tmp | ||
| *.orig | ||
| *~ | ||
| # Various IDEs | ||
| .project | ||
| .idea/ | ||
| *.tmproj | ||
| .vscode/ |
This file contains hidden or 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,24 @@ | ||
| apiVersion: v2 | ||
| name: mcs-controller-manager | ||
| description: A Helm chart for Kubernetes | ||
|
|
||
| # A chart can be either an 'application' or a 'library' chart. | ||
| # | ||
| # Application charts are a collection of templates that can be packaged into versioned archives | ||
| # to be deployed. | ||
| # | ||
| # Library charts provide useful utilities or functions for the chart developer. They're included as | ||
| # a dependency of application charts to inject those utilities and functions into the rendering | ||
| # pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
| type: application | ||
|
|
||
| # This is the chart version. This version number should be incremented each time you make changes | ||
| # to the chart and its templates, including the app version. | ||
| # Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
| version: 0.1.0 | ||
|
|
||
| # This is the version number of the application being deployed. This version number should be | ||
| # incremented each time you make changes to the application. Versions are not expected to | ||
| # follow Semantic Versioning. They should reflect the version the application is using. | ||
| # It is recommended to use it with quotes. | ||
| appVersion: "v0.1.0" |
This file contains hidden or 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,42 @@ | ||
| # Azure Fleet MultiClusterService Controller Manager Helm Chart | ||
|
|
||
| ## Install CRD | ||
|
|
||
| ```bash | ||
| # Go to root folder of fleet-networking repo | ||
| cd <REPO_DIRECTORY>/fleet-networking | ||
| kubectl apply -f config/crd/* | ||
| ``` | ||
|
|
||
| ## Install Chart | ||
|
|
||
| ```bash | ||
| # Helm install under root directory of fleet-networking repo | ||
| helm install mcs-controller-manager ./charts/mcs-controller-manager/ | ||
| ``` | ||
|
|
||
| _See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._ | ||
|
|
||
| ## Upgrade Chart | ||
|
|
||
| ```bash | ||
| # Helm upgrade under root directory of fleet-networking repo | ||
| helm upgrade mcs-controller-manager ./charts/mcs-controller-manager/ | ||
| ``` | ||
|
|
||
| ## Parameters | ||
|
|
||
| | Parameter | Description | Default | | ||
| |:-|:-|:-| | ||
| | replicaCount | The number of mcs-controller-manager replicas to deploy | `1` | | ||
| | image.repository | Image repository | `ghcr.io/azure/fleet-networking/mcs-controller-manager` | | ||
| | image.pullPolicy | Image pullPolicy | `IfNotPresent` | | ||
| | image.tag | The image tag to use | `v0.1.0` | | ||
| | logVerbosity | Log level. Uses V logs (klog) | `2` | | ||
| | fleetSystemNamespace | Namespace that this Helm chart is installed on and reserved by fleet. | `fleet-system` | | ||
| | resources | The resource request/limits for the container image | limits: 500m CPU, 1Gi, requests: 100m CPU, 128Mi | | ||
| | podAnnotations | Pod Annotations | `{}` | | ||
| | affinity | The node affinity to use for pod scheduling | `{}` | | ||
| | tolerations | The toleration to use for pod scheduling | `[]` | | ||
|
|
||
| ## Contributing Changes |
This file contains hidden or 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,51 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "mcs-controller-manager.name" -}} | ||
| {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create a default fully qualified app name. | ||
| We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
| If release name contains chart name it will be used as a full name. | ||
| */}} | ||
| {{- define "mcs-controller-manager.fullname" -}} | ||
| {{- if .Values.fullnameOverride }} | ||
| {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- $name := default .Chart.Name .Values.nameOverride }} | ||
| {{- if contains $name .Release.Name }} | ||
| {{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create chart name and version as used by the chart label. | ||
| */}} | ||
| {{- define "mcs-controller-manager.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "mcs-controller-manager.labels" -}} | ||
| helm.sh/chart: {{ include "mcs-controller-manager.chart" . }} | ||
| {{ include "mcs-controller-manager.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "mcs-controller-manager.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "mcs-controller-manager.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} |
This file contains hidden or 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,56 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ include "mcs-controller-manager.fullname" . }} | ||
| namespace: {{ .Values.fleetSystemNamespace }} | ||
| labels: | ||
| {{- include "mcs-controller-manager.labels" . | nindent 4 }} | ||
| spec: | ||
| replicas: {{ .Values.replicaCount }} | ||
| selector: | ||
| matchLabels: | ||
| {{- include "mcs-controller-manager.selectorLabels" . | nindent 6 }} | ||
| template: | ||
| metadata: | ||
| {{- with .Values.podAnnotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| labels: | ||
| {{- include "mcs-controller-manager.selectorLabels" . | nindent 8 }} | ||
| spec: | ||
| serviceAccountName: {{ include "mcs-controller-manager.fullname" . }}-sa | ||
| containers: | ||
| - name: {{ .Chart.Name }} | ||
| image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
| imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
| args: | ||
| - --leader-elect={{ .Values.enableLeaderElection }} | ||
| - --fleet-system-namespace={{ .Values.fleetSystemNamespace }} | ||
| - --v={{ .Values.logVerbosity }} | ||
| ports: | ||
| - containerPort: 8081 | ||
| name: healthz | ||
| protocol: TCP | ||
| livenessProbe: | ||
|
mainred marked this conversation as resolved.
Outdated
|
||
| httpGet: | ||
| path: /healthz | ||
| port: healthz | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /readyz | ||
| port: healthz | ||
| resources: | ||
| {{- toYaml .Values.resources | nindent 12 }} | ||
| {{- with .Values.nodeSelector }} | ||
| nodeSelector: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.affinity }} | ||
| affinity: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.tolerations }} | ||
| tolerations: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
This file contains hidden or 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,70 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: {{ include "mcs-controller-manager.fullname" . }}-role | ||
| rules: | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - services | ||
| verbs: | ||
| - create | ||
| - delete | ||
| - get | ||
| - list | ||
| - patch | ||
| - update | ||
| - watch | ||
| - apiGroups: | ||
| - networking.fleet.azure.com | ||
| resources: | ||
| - multiclusterservices | ||
| verbs: | ||
| - create | ||
| - delete | ||
| - get | ||
| - list | ||
| - patch | ||
| - update | ||
| - watch | ||
| - apiGroups: | ||
| - networking.fleet.azure.com | ||
| resources: | ||
| - multiclusterservices/finalizers | ||
| verbs: | ||
| - get | ||
| - update | ||
| - apiGroups: | ||
| - networking.fleet.azure.com | ||
| resources: | ||
| - multiclusterservices/status | ||
| verbs: | ||
| - get | ||
| - patch | ||
| - update | ||
| - apiGroups: | ||
| - networking.fleet.azure.com | ||
| resources: | ||
| - serviceimports | ||
| verbs: | ||
| - create | ||
| - delete | ||
| - get | ||
| - list | ||
| - patch | ||
| - update | ||
| - watch | ||
| --- | ||
| kind: ClusterRoleBinding | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| metadata: | ||
| name: {{ include "mcs-controller-manager.fullname" . }}-role-binding | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: {{ include "mcs-controller-manager.fullname" . }}-role | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ include "mcs-controller-manager.fullname" . }}-sa | ||
| namespace: {{ .Values.fleetSystemNamespace }} |
This file contains hidden or 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,7 @@ | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: {{ include "mcs-controller-manager.fullname" . }}-sa | ||
| namespace: {{ .Values.fleetSystemNamespace }} | ||
| labels: | ||
| {{- include "mcs-controller-manager.labels" . | nindent 4 }} |
This file contains hidden or 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,31 @@ | ||
| # Default values for mcs-controller-manager. | ||
| # This is a YAML-formatted file. | ||
| # Declare variables to be passed into your templates. | ||
|
|
||
| replicaCount: 1 | ||
|
|
||
| image: | ||
| repository: ghcr.io/azure/fleet-networking/mcs-controller-manager | ||
| pullPolicy: IfNotPresent | ||
| # Overrides the image tag whose default is the chart appVersion. | ||
| tag: "v0.1.0" | ||
|
|
||
| logVerbosity: 2 | ||
|
|
||
| fleetSystemNamespace: fleet-system | ||
|
|
||
| resources: | ||
|
mainred marked this conversation as resolved.
|
||
| limits: | ||
| cpu: 500m | ||
| memory: 1Gi | ||
| requests: | ||
| cpu: 100m | ||
| memory: 128Mi | ||
|
|
||
| podAnnotations: {} | ||
|
|
||
| nodeSelector: {} | ||
|
|
||
| tolerations: [] | ||
|
|
||
| affinity: {} | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.