Skip to content

Commit

Permalink
Automate / script Helm chart releases (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
draychev authored and akshaysngupta committed May 24, 2019
1 parent 8a11366 commit f567f0c
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 3 deletions.
5 changes: 5 additions & 0 deletions helm/ingress-azure/Chart-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "XXVERSIONXX"
description: Use Azure Application Gateway as the ingress for an Azure Kubernetes Service cluster.
name: ingress-azure
version: XXVERSIONXX
46 changes: 46 additions & 0 deletions helm/ingress-azure/values-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
replicaCount: 1

image:
repository: mcr.microsoft.com/azure-application-gateway/kubernetes-ingress
tag: XXVERSIONXX
pullPolicy: Always

################################################################################
# Specify which kubernetes namespace the ingress controller will watch
#
kubernetes:
watchNamespace: default

################################################################################
# Specify which application gateway the ingress controller will manage
#
# appgw:
# subscriptionId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# resourceGroup: myResourceGroup
# name: myApplicationGateway

################################################################################
# Specify the authentication with Azure Resource Manager
#
# Two authentication methods are available:
# - Option 1: AAD-Pod-Identity (https://github.com/Azure/aad-pod-identity)
# armAuth:
# type: aadPodIdentity
# identityResourceID: <>
# identityClientID: <>
#
# - Option 2: ServicePrincipal as a kubernetes secret
# armAuth:
# type: servicePrincipal
# secretName: networking-appgw-k8s-azure-service-principal
# secretKey: ServicePrincipal.json

################################################################################
# Specify if the cluster is RBAC enabled or not
# rbac:
# enabled: false # true/false

################################################################################
# Specify if the cluster is RBAC enabled or not
# aksClusterConfiguration:
# apiServerAddress: <>
24 changes: 21 additions & 3 deletions helm/release.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
#!/bin/bash
set -e

set -eauo pipefail

GIT_TAG=$(git describe --abbrev=0 --tags)

TGZ_FILE=(ingress-azure-$GIT_TAG.tgz)

if [ -f $TGZ_FILE ]; then
echo "File $TGZ_FILE already exists!"
exit 0
fi

echo " - update helm templates"
cat ingress-azure/Chart-template.yaml | sed "s/XXVERSIONXX/$GIT_TAG/g" > ingress-azure/Chart.yaml
cat ingress-azure/values-template.yaml | sed "s/XXVERSIONXX/$GIT_TAG/g" > ingress-azure/values.yaml

echo " - running helm package"
helm package ingress-azure --version 0.4.0
helm package ingress-azure --version "$GIT_TAG"

echo " - updating helm repo index"
helm repo index . --url https://azure.github.io/application-gateway-kubernetes-ingress/helm
echo " - done!"


echo " - done!"

0 comments on commit f567f0c

Please sign in to comment.