-
Notifications
You must be signed in to change notification settings - Fork 41
fix: Update Github Action to publish arc member agent helm charts to MCR #1162
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
xmuhammad-xali
merged 5 commits into
Azure:main
from
xmuhammad-xali:alimuhammad/fleet/arc-member-agent-helm-charts
Aug 4, 2025
Merged
Changes from all commits
Commits
Show all changes
5 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
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
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 @@ | ||
| *.tgz |
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: arc-member-cluster-agents-helm-chart | ||
| 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: "1.16.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,62 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "fleet-member-agent.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 "fleet-member-agent.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 "fleet-member-agent.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "fleet-member-agent.labels" -}} | ||
| helm.sh/chart: {{ include "fleet-member-agent.chart" . }} | ||
| {{ include "fleet-member-agent.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "fleet-member-agent.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "fleet-member-agent.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "fleet-member-agent.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "fleet-member-agent.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} |
10 changes: 10 additions & 0 deletions
10
charts/member-agent-arc/templates/azure-proxy-secrets.yaml
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,10 @@ | ||
| {{- if and .Values.Azure.proxySettings.isProxyEnabled .Values.Azure.proxySettings.proxyCert }} | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: azure-proxy-cert | ||
| namespace: fleet-system | ||
| type: Opaque | ||
| data: | ||
| proxy-cert.crt: {{ .Values.Azure.proxySettings.proxyCert | b64enc | quote }} | ||
| {{- end }} |
130 changes: 130 additions & 0 deletions
130
charts/member-agent-arc/templates/crds/appliedworks.yaml
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,130 @@ | ||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| annotations: | ||
| controller-gen.kubebuilder.io/version: v0.11.4 | ||
| labels: | ||
| {{- if .Values.legacyAddonDelivery }} | ||
| addonmanager.kubernetes.io/mode: Reconcile | ||
| {{- end }} | ||
| kubernetes.azure.com/managedby: fleet | ||
| name: appliedworks.placement.kubernetes-fleet.io | ||
| spec: | ||
| group: placement.kubernetes-fleet.io | ||
| names: | ||
| categories: | ||
| - fleet | ||
| - fleet-placement | ||
| kind: AppliedWork | ||
| listKind: AppliedWorkList | ||
| plural: appliedworks | ||
| singular: appliedwork | ||
| scope: Cluster | ||
| versions: | ||
| - name: v1 | ||
| schema: | ||
| openAPIV3Schema: | ||
| properties: | ||
| apiVersion: | ||
| type: string | ||
| kind: | ||
| type: string | ||
| metadata: | ||
| type: object | ||
| spec: | ||
| properties: | ||
| workName: | ||
| type: string | ||
| workNamespace: | ||
| type: string | ||
| required: | ||
| - workName | ||
| - workNamespace | ||
| type: object | ||
| status: | ||
| properties: | ||
| appliedResources: | ||
| items: | ||
| properties: | ||
| group: | ||
| type: string | ||
| kind: | ||
| type: string | ||
| name: | ||
| type: string | ||
| namespace: | ||
| type: string | ||
| ordinal: | ||
| type: integer | ||
| resource: | ||
| type: string | ||
| uid: | ||
| type: string | ||
| version: | ||
| type: string | ||
| required: | ||
| - ordinal | ||
| type: object | ||
| type: array | ||
| type: object | ||
| required: | ||
| - spec | ||
| type: object | ||
| served: true | ||
| storage: false | ||
| subresources: | ||
| status: {} | ||
| - name: v1beta1 | ||
| schema: | ||
| openAPIV3Schema: | ||
| properties: | ||
| apiVersion: | ||
| type: string | ||
| kind: | ||
| type: string | ||
| metadata: | ||
| type: object | ||
| spec: | ||
| properties: | ||
| workName: | ||
| type: string | ||
| workNamespace: | ||
| type: string | ||
| required: | ||
| - workName | ||
| - workNamespace | ||
| type: object | ||
| status: | ||
| properties: | ||
| appliedResources: | ||
| items: | ||
| properties: | ||
| group: | ||
| type: string | ||
| kind: | ||
| type: string | ||
| name: | ||
| type: string | ||
| namespace: | ||
| type: string | ||
| ordinal: | ||
| type: integer | ||
| resource: | ||
| type: string | ||
| uid: | ||
| type: string | ||
| version: | ||
| type: string | ||
| required: | ||
| - ordinal | ||
| type: object | ||
| type: array | ||
| type: object | ||
| required: | ||
| - spec | ||
| type: object | ||
| served: true | ||
| storage: true | ||
| subresources: | ||
| status: {} |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move it to the https://github.com/Azure/fleet-networking/blob/main/.github/workflows/build-publish-mcr.yml and handle it independently?
there is no order guaranteed when we cut the release.
there will be a case, we cut the fleet first and then fleet-networking. Then your acr does not have the latest fleet-networking tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fleet member agent and networking agent both are needed to package and push to MCR.
We can move to fleet-networking but then we would then need to fetch the azure fleet version and would end up in the same case as you mentioned.
We will update the release process to update the order of cutting the release to
I spoke to Britania, and it seems to be that DP team cuts the azure/fleet-networking first as it does not require backporting from the kubefleet and is easier compared to azure/fleet agent release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why merging fleet-networking and fleet agent into one chart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suppose someone updates fleet-networking repo, how do they know they need to update here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i have the same question as Wantong, why we need to couple fleet and fleet-networking into one chart? why not doing it independently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why merging fleet-networking and fleet agent into one chart?
We are working on enabling Arc connected clusters to join fleets as members. We install the agents on Arc clusters as an Arc Extension. The Arc Extension is simply a packaged helm chart pushed into MCR. Since we are installing the networking and fleet agents onto the Arc Clusters, they need to be packaged as one for Arc Extension. Please see this wiki for more info.
Suppose someone updates fleet-networking repo, how do they know they need to update here too?
We will be updating the Fleet Release Manual to ensure that we always run the Github Action to package all updated agents and push to MCR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add a comment in this workflow to provide such context? so that we don't lose the context in the future.
Please update the release manual to make sure that when people bump the agent versions for the aks cluster, use the same version combination as the arc helm charts. Otherwise, what's installed in the normal aks cluster could be different from arc clusters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Github Action, if no tag is provided for agent versions we fetch the latest tag and push that to MCR. We are doing the same for the ARC helm charts. We use the bumped/updated tag agent version for both fleet agent for the aks cluster and arc helm chart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to clarify that, i'm talking about the toggle bump PR, who creates the bump PR needs to make sure the ARC is using the same versions (fleet & fleet-networking) as the one defined in the toggle to keep them consistent.