-
Notifications
You must be signed in to change notification settings - Fork 198
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
Adds support for Helm and Kustomize for AKS service target #3196
Conversation
54dd0fa
to
71fc302
Compare
d77fe27
to
1665456
Compare
12be9df
to
65dea4e
Compare
65dea4e
to
35721cf
Compare
35721cf
to
5b09ab6
Compare
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
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.
I wonder if long term we can have both helm and Kustomize automatically pulled by azd (like gh and bicep). That might be atractive to customers?
We could, but there is complexity, security and maybe legal implications of doing something like this. My recommendation is that we are consistent and either do this across the board for all our dependencies or none of them. |
Helm
This PR adds Helm support for using
azd
with AKS.Resolves: #1618
Important
To enable Helm support ensure you have the Helm CLI installed
Enable the helm feature flag by running
azd config set alpha.aks.helm on
What Included so far
azd
serviceazd
service does not require any code/docker filesazure.yaml
configuration forazd
helm
configuration section under thek8s
sectionazd deploy
Outputdeployed
stateKustomize
Important
To enable Helm support ensure you have the Kustomize CLI installed
Enable the helm feature flag by running
azd config set alpha.aks.kustomize on
Adds support to leverage kustomize as part of k8s deployments.
Includes the following:
base
andvariant
configurationsedits
that can be run before deploymentsconfigMapGenerator
with azd environmentsConfiguration
The following new configurations are available within the
azure.yaml
file.service.k8s.kustomize
dir
: Relative path from the service to your kustomize directory that contains akustomization.yaml
fileedits
: Array of edit expression that are applied before deploymentenv
: Map of key/value pairs generated before deploymentUse Cases
The following use cases are supported by this change
Use Case: Dev want to deploy k8s manifests with basic kustomization
The following configuration will perform a
kubectl apply -k <dir>
command that points to your manifests folder that contains akustomization.yaml
.Use Case: Dev wants to use overlays to deploy to with different variants
This use case is typically used to have custom configurations for deploying to different stages or environments.
Examples of this would be
dev
,test
andprod
In this example the user can specify the
${AZURE_ENV_NAME}
environment variable within the kustomize directory to automatically leverage the azd environments as your default overlay convention.Use Case: Dev wants to modify kustomization.yaml before deployment
A common use case for modifying the kustomization.yaml would be for modifying container image names/versions used as part of your deployment
In the following example, specify an
edits
configuration and set any validkustomize edit ...
command. Environment variables referenced within the edit command are automatically interpolated from your azd environment variables.Use Case: Dev want to use
azd
environment variables within config mapsConfig maps or secrets are critical in configuring your k8s clusters. Since kustomize does not support any direct environment variable substitution we can leverage the kustomize
configMapGenerator
with a.env
file.The
kustomize
configuration section supports aenv
section where one or many key/value pairs can be defined. This configuration will automatically generate a temporary.env
file within your kustomization directory that can be used by aconfigMapGenerator
The following configuration will create a
.env
with the specified key/value pairs.The
configMapGenerator
will now generated a k8s config map with the specified name and contain all the key/value pairs referenced within the.env
file.