Helm provider for bicep #12964
Replies: 3 comments
-
See #12964 |
Beta Was this translation helpful? Give feedback.
-
I am not an expert on Azure Kubernetes or Helm charts, but I helped someone in the community with this before. There is not native resource provider to deploy Helm charts as far as I know but there is a way around that might be helpful to you. The Bicep template below deploys a deployment script which has variable that loads a file as base64. This is to keep the YAML format. The scriptContent shows how to load from a base64 string in PowerShell. Add your required commands for helm and it should work. param parLocation string = resourceGroup().location
@description('''
Value of test.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
name: example-config
data:
setting1: "value1"
setting2: "value2"
setting3: "value3"
''')
var varBase64EncodedYaml = loadFileAsBase64('test.yml')
resource deploymentScript 'Microsoft.Resources/deploymentScripts@2023-08-01' = {
name: 'deployYamlConfiguration'
location: parLocation
kind: 'AzurePowerShell'
properties: {
scriptContent: '''
param($encodedYaml)
[Text.Encoding]::Utf8.GetString([Convert]::FromBase64String($encodedYaml))
'''
arguments: '-encodedYaml ${varBase64EncodedYaml}'
timeout: 'PT1H'
cleanupPreference: 'OnSuccess'
retentionInterval: 'P1D'
azPowerShellVersion: '9.0'
}
} |
Beta Was this translation helpful? Give feedback.
-
Interesting. Helm is an abstraction on top of "plain" Kubernetes yaml, and then the idea is to add an abstraction on top of that? Not aware of an out of box way to do this other than do a scripts pointed out by @johnlokerse There is however (in preview) a way to bring the non-Helm yaml into Bicep: Would that be a viable path to work from? |
Beta Was this translation helpful? Give feedback.
-
How can we deploy helm chart to aks clusters using bicep. I didn't find any useful reference online, so is this possible with bicep. PS: new to bicep
Beta Was this translation helpful? Give feedback.
All reactions