Skip to content

Commit 732d8ae

Browse files
Support for workload identity in AGIC Helm installation (#1498)
* support for workload identity * add comment * fix comment in auth file and add label to pod instead of deployment * change base image to 1.19.5 for building as azcore requires
1 parent 7b496a6 commit 732d8ae

File tree

15 files changed

+233
-25
lines changed

15 files changed

+233
-25
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GO_BINARY_NAME ?= appgw-ingress
1515
GOOS ?= linux
1616
GARCH ?= arm64
1717

18-
BUILD_BASE_IMAGE ?= golang:1.17.3
18+
BUILD_BASE_IMAGE ?= golang:1.19.5
1919

2020
REPO ?= appgwreg.azurecr.io
2121
IMAGE_NAME = public/azure-application-gateway/kubernetes-ingress-staging

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ go 1.19
44

55
require (
66
github.com/Azure/azure-sdk-for-go v66.0.0+incompatible
7+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0
8+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0-beta.2
79
github.com/Azure/go-autorest/autorest v0.11.28
810
github.com/Azure/go-autorest/autorest/azure/auth v0.5.11
911
github.com/Azure/go-autorest/autorest/to v0.4.0
@@ -24,15 +26,15 @@ require (
2426
)
2527

2628
require (
27-
github.com/AlekSi/gocov-xml v1.1.0 // indirect
29+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect
2830
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
2931
github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect
3032
github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect
3133
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
3234
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
3335
github.com/Azure/go-autorest/logger v0.2.1 // indirect
3436
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
35-
github.com/axw/gocov v1.1.0 // indirect
37+
github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 // indirect
3638
github.com/beorn7/perks v1.0.1 // indirect
3739
github.com/cespare/xxhash/v2 v2.1.2 // indirect
3840
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -51,15 +53,14 @@ require (
5153
github.com/hashicorp/golang-lru v0.5.1 // indirect
5254
github.com/imdario/mergo v0.3.13 // indirect
5355
github.com/json-iterator/go v1.1.12 // indirect
54-
github.com/jstemmer/go-junit-report v1.0.0 // indirect
5556
github.com/kr/text v0.2.0 // indirect
56-
github.com/matm/gocov-html v0.0.0-20200509184451-71874e2e203b // indirect
5757
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
5858
github.com/mitchellh/go-homedir v1.1.0 // indirect
5959
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6060
github.com/modern-go/reflect2 v1.0.2 // indirect
6161
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
6262
github.com/nxadm/tail v1.4.8 // indirect
63+
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect
6364
github.com/pkg/errors v0.9.1 // indirect
6465
github.com/prometheus/client_model v0.2.0 // indirect
6566
github.com/prometheus/common v0.26.0 // indirect
@@ -72,7 +73,6 @@ require (
7273
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
7374
golang.org/x/text v0.3.7 // indirect
7475
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
75-
golang.org/x/tools v0.1.12 // indirect
7676
google.golang.org/appengine v1.6.7 // indirect
7777
google.golang.org/protobuf v1.28.0 // indirect
7878
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect

go.sum

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7
1111
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
1212
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
1313
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
14-
github.com/AlekSi/gocov-xml v1.1.0 h1:iElWGi7s/MuL8/d8WDtI2fOAsN3ap9x8nK5RrAhaDng=
15-
github.com/AlekSi/gocov-xml v1.1.0/go.mod h1:g1dRVOCHjKkMtlPfW6BokJ/qxoeZ1uPNAK7A/ii3CUo=
1614
github.com/Azure/azure-sdk-for-go v66.0.0+incompatible h1:bmmC38SlE8/E81nNADlgmVGurPWMHDX2YNXVQMrBpEE=
1715
github.com/Azure/azure-sdk-for-go v66.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
16+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k=
17+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U=
18+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0-beta.2 h1:NsprcuNHEsCR48QYlLxx/gAi9OcCzcwX8VVTZVK8fdQ=
19+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0-beta.2/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM=
20+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY=
21+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w=
1822
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
1923
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
2024
github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=
@@ -46,6 +50,8 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z
4650
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
4751
github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=
4852
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
53+
github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0 h1:VgSJlZH5u0k2qxSpqyghcFQKmvYckj46uymKK5XzkBM=
54+
github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU=
4955
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
5056
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
5157
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
@@ -56,9 +62,6 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
5662
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
5763
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
5864
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
59-
github.com/axw/gocov v1.0.0/go.mod h1:LvQpEYiwwIb2nYkXY2fDWhg9/AsYqkhmrCshjlUJECE=
60-
github.com/axw/gocov v1.1.0 h1:y5U1krExoJDlb/kNtzxyZQmNRprFOFCutWbNjcQvmVM=
61-
github.com/axw/gocov v1.1.0/go.mod h1:H9G4tivgdN3pYSSVrTFBr6kGDCmAkgbJhtxFzAvgcdw=
6265
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
6366
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
6467
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -80,6 +83,7 @@ github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS3
8083
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
8184
github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U=
8285
github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE=
86+
github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c=
8387
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
8488
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
8589
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
@@ -185,8 +189,6 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
185189
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
186190
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
187191
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
188-
github.com/jstemmer/go-junit-report v1.0.0 h1:8X1gzZpR+nVQLAht+L/foqOeX2l9DTZoaIPbEQHxsds=
189-
github.com/jstemmer/go-junit-report v1.0.0/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
190192
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
191193
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
192194
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
@@ -206,8 +208,6 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
206208
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
207209
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
208210
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
209-
github.com/matm/gocov-html v0.0.0-20200509184451-71874e2e203b h1:5Wc/N1FIBnExmX0/SEdKe0A0COvdJc3rCGHQ7s1oBPQ=
210-
github.com/matm/gocov-html v0.0.0-20200509184451-71874e2e203b/go.mod h1:zha4ZSIA/qviBBKx3j6tJG/Lx6aIdjOXPWuKAcJchQM=
211211
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
212212
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
213213
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
@@ -243,6 +243,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y
243243
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
244244
github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
245245
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
246+
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI=
247+
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ=
246248
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
247249
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
248250
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -413,7 +415,6 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn
413415
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
414416
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
415417
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
416-
golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
417418
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
418419
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
419420
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -425,8 +426,6 @@ golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapK
425426
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
426427
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
427428
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
428-
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
429-
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
430429
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
431430
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
432431
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

helm/ingress-azure/templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ data:
7878
{{- end }}
7979

8080
{{- if .Values.armAuth -}}
81-
{{- if eq .Values.armAuth.type "aadPodIdentity"}}
81+
{{- if or (eq .Values.armAuth.type "aadPodIdentity") (eq .Values.armAuth.type "workloadIdentity") }}
8282
AZURE_CLIENT_ID: "{{ .Values.armAuth.identityClientID }}"
8383
USE_MANAGED_IDENTITY_FOR_POD: "true"
8484
{{- end }}

helm/ingress-azure/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ spec:
2222
{{- if eq .Values.armAuth.type "aadPodIdentity"}}
2323
aadpodidbinding: {{ template "application-gateway-kubernetes-ingress.fullname" . }}
2424
{{- end }}
25+
{{- if eq .Values.armAuth.type "workloadIdentity" }}
26+
azure.workload.identity/use: "true"
27+
{{- end }}
2528
{{- end }}
2629
annotations:
2730
checksum/config: {{ print .Values | sha256sum }}

helm/ingress-azure/templates/serviceaccount.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,11 @@ metadata:
66
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
77
heritage: {{ .Release.Service }}
88
release: {{ .Release.Name }}
9+
{{- if .Values.armAuth }}
10+
{{- if eq .Values.armAuth.type "workloadIdentity" }}
11+
azure.workload.identity/use: "true"
12+
annotations:
13+
azure.workload.identity/client-id: {{ required "armAuth.identityClientID is required if using Workload Identity" .Values.armAuth.identityClientID }}
14+
{{- end }}
15+
{{- end }}
916
name: {{ template "application-gateway-kubernetes-ingress.serviceaccountname" . }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"verbosityLevel": 3,
3+
"appgw": {
4+
"subscriptionId": "sub-id",
5+
"resourceGroup": "resgp",
6+
"name": "gateway",
7+
"usePrivateIP": false,
8+
"shared": false
9+
},
10+
"armAuth": {
11+
"type": "workloadIdentity",
12+
"identityClientID": "client-id"
13+
},
14+
"rbac": {
15+
"enabled": false
16+
},
17+
"kubernetes": {
18+
"resources": {}
19+
}
20+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
# Source: ingress-azure/templates/configmap.yaml
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: release-name-cm-ingress-azure
7+
labels:
8+
app: ingress-azure
9+
chart: ingress-azure-1.6.0
10+
heritage: Helm
11+
release: release-name
12+
data:
13+
APPGW_VERBOSITY_LEVEL: "3"
14+
MULTI_CLUSTER_MODE: "false"
15+
HTTP_SERVICE_PORT: "8123"
16+
APPGW_SUBSCRIPTION_ID: "sub-id"
17+
APPGW_RESOURCE_GROUP: "resgp"
18+
APPGW_NAME: "gateway"
19+
APPGW_SUBNET_NAME: "gateway-subnet"
20+
AZURE_CLIENT_ID: "client-id"
21+
USE_MANAGED_IDENTITY_FOR_POD: "true"
22+
INGRESS_CLASS_RESOURCE_ENABLED: "true"
23+
INGRESS_CLASS_RESOURCE_NAME: "azure-application-gateway"
24+
INGRESS_CLASS_RESOURCE_CONTROLLER: "azure/application-gateway"
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
# Source: ingress-azure/templates/deployment.yaml
3+
apiVersion: apps/v1
4+
kind: Deployment
5+
metadata:
6+
name: release-name-ingress-azure
7+
labels:
8+
app: ingress-azure
9+
chart: ingress-azure-1.6.0
10+
heritage: Helm
11+
release: release-name
12+
spec:
13+
replicas: 1 # TODO: Make configurable when leader election is supported.
14+
selector:
15+
matchLabels:
16+
app: ingress-azure
17+
release: release-name
18+
template:
19+
metadata:
20+
labels:
21+
app: ingress-azure
22+
release: release-name
23+
azure.workload.identity/use: "true"
24+
annotations:
25+
prometheus.io/scrape: "true"
26+
prometheus.io/port: "8123"
27+
spec:
28+
serviceAccountName: release-name-sa-ingress-azure
29+
securityContext:
30+
runAsUser: 0
31+
containers:
32+
- name: ingress-azure
33+
image: mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.6.0
34+
imagePullPolicy: Always
35+
readinessProbe:
36+
httpGet:
37+
path: /health/ready
38+
port: 8123
39+
initialDelaySeconds: 5
40+
periodSeconds: 10
41+
livenessProbe:
42+
httpGet:
43+
path: /health/alive
44+
port: 8123
45+
initialDelaySeconds: 15
46+
periodSeconds: 20
47+
env:
48+
- name: AZURE_CLOUD_PROVIDER_LOCATION
49+
value: /etc/appgw/azure.json
50+
- name: AGIC_POD_NAME
51+
valueFrom:
52+
fieldRef:
53+
fieldPath: metadata.name
54+
- name: AGIC_POD_NAMESPACE
55+
valueFrom:
56+
fieldRef:
57+
fieldPath: metadata.namespace
58+
envFrom:
59+
- configMapRef:
60+
name: release-name-cm-ingress-azure
61+
volumeMounts:
62+
- name: azure
63+
mountPath: /etc/appgw/
64+
readOnly: true
65+
volumes:
66+
- name: azure
67+
hostPath:
68+
path: /etc/kubernetes/
69+
type: Directory
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Source: ingress-azure/templates/ingressclass.yaml
3+
apiVersion: networking.k8s.io/v1
4+
kind: IngressClass
5+
metadata:
6+
labels:
7+
app.kubernetes.io/component: controller
8+
name: azure-application-gateway
9+
spec:
10+
controller: azure/application-gateway

0 commit comments

Comments
 (0)