-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
400e248
commit fa3d1e2
Showing
10 changed files
with
349 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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
103 changes: 103 additions & 0 deletions
103
helm/ingress-azure/tests/fixtures/sample-config-addon.json
This file contains 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,103 @@ | ||
{ | ||
"verbosityLevel": 3, | ||
"appgw": { | ||
"subscriptionId": "0000-0000-0000-0000-00000000", | ||
"resourceGroup": "resgp", | ||
"name": "gateway", | ||
"usePrivateIP": false, | ||
"shared": false | ||
}, | ||
"armAuth": { | ||
"type": "aadPodIdentity", | ||
"identityResourceID": "/a/b/c", | ||
"identityClientID": "0000-0000-0000-0000-00000000" | ||
}, | ||
"rbac": { | ||
"enabled": false | ||
}, | ||
"kubernetes": { | ||
"multiClusterMode": false, | ||
"watchNamespace": "a,b,c", | ||
"securityContext": { | ||
"runAsUser": 3000, | ||
"runAsGroup": 3000 | ||
}, | ||
"containerSecurityContext": { | ||
"readOnlyRootFilesystem": "true" | ||
}, | ||
"resources": { | ||
"limits": { | ||
"cpu": "200m", | ||
"memory": "100Mi" | ||
}, | ||
"requests": { | ||
"cpu": "100m", | ||
"memory": "100Mi" | ||
} | ||
}, | ||
"nodeSelector": { | ||
"beta.kubernetes.io/os": "linux" | ||
}, | ||
"podAnnotations": { | ||
"custom-annotation": "custom-value" | ||
}, | ||
"tolerations": [ | ||
{ | ||
"key": "CriticalAppsOnly", | ||
"operator": "Exists" | ||
} | ||
], | ||
"affinity": { | ||
"nodeAffinity": { | ||
"preferredDuringSchedulingIgnoredDuringExecution": [ | ||
{ | ||
"weight": 100, | ||
"preference": { | ||
"matchExpressions": [ | ||
{ | ||
"key": "kubernetes.cloud.com/mode", | ||
"operator": "In", | ||
"values": [ | ||
"system" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"requiredDuringSchedulingIgnoredDuringExecution": { | ||
"nodeSelectorTerms": [ | ||
{ | ||
"labelSelector": null, | ||
"matchExpressions": [ | ||
{ | ||
"key": "kubernetes.cloud.com/cluster", | ||
"operator": "Exists" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"volumes": { | ||
"extraVolumes": [ | ||
{ | ||
"name": "contoso", | ||
"hostPath": { | ||
"path": "/etc/contoso/", | ||
"type": "Directory" | ||
} | ||
} | ||
], | ||
"extraVolumeMounts": [ | ||
{ | ||
"name": "contoso", | ||
"mountPath": "/etc/contoso/", | ||
"readOnly": true | ||
} | ||
] | ||
} | ||
}, | ||
"addon": true | ||
} |
10 changes: 10 additions & 0 deletions
10
...ss-azure/tests/snapshots/sample-config-addon/ingress-azure/templates/aadpodidbinding.yaml
This file contains 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 @@ | ||
--- | ||
# Source: ingress-azure/templates/aadpodidbinding.yaml | ||
# Please see https://github.com/Azure/aad-pod-identity for more inromation | ||
apiVersion: "aadpodidentity.k8s.io/v1" | ||
kind: AzureIdentityBinding | ||
metadata: | ||
name: release-name-azidbinding-ingress-azure | ||
spec: | ||
azureIdentity: release-name-azid-ingress-azure | ||
selector: release-name-ingress-azure |
11 changes: 11 additions & 0 deletions
11
...ess-azure/tests/snapshots/sample-config-addon/ingress-azure/templates/aadpodidentity.yaml
This file contains 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,11 @@ | ||
--- | ||
# Source: ingress-azure/templates/aadpodidentity.yaml | ||
# Please see https://github.com/Azure/aad-pod-identity for more information | ||
apiVersion: "aadpodidentity.k8s.io/v1" | ||
kind: AzureIdentity | ||
metadata: | ||
name: release-name-azid-ingress-azure | ||
spec: | ||
type: 0 | ||
resourceID: /a/b/c | ||
clientID: 0000-0000-0000-0000-00000000 |
63 changes: 63 additions & 0 deletions
63
...ngress-azure/tests/snapshots/sample-config-addon/ingress-azure/templates/cleanup-job.yaml
This file contains 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,63 @@ | ||
--- | ||
# Source: ingress-azure/templates/cleanup-job.yaml | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: release-name-ingress-azure-cleanup | ||
labels: | ||
app: ingress-azure-cleanup | ||
chart: ingress-azure-1.6.0 | ||
heritage: Helm | ||
release: release-name | ||
annotations: | ||
"helm.sh/hook": pre-delete | ||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: release-name-sa-ingress-azure | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: cleanup | ||
image: "mcr.microsoft.com/oss/kubernetes/kubectl:v1.30.5" | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: AGIC_POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
command: | ||
- "kubectl" | ||
- "delete" | ||
- "--ignore-not-found" | ||
- "--wait" | ||
- "-n" | ||
- "$(AGIC_POD_NAMESPACE)" | ||
- "overlayextensionconfigs.acn.azure.com" | ||
- "-l" | ||
- "app.kubernetes.io/managed-by=ingress-azure-addon" | ||
securityContext: | ||
capabilities: | ||
drop: | ||
- ALL | ||
nodeSelector: | ||
beta.kubernetes.io/os: linux | ||
affinity: | ||
nodeAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- preference: | ||
matchExpressions: | ||
- key: kubernetes.cloud.com/mode | ||
operator: In | ||
values: | ||
- system | ||
weight: 100 | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- labelSelector: null | ||
matchExpressions: | ||
- key: kubernetes.cloud.com/cluster | ||
operator: Exists | ||
tolerations: | ||
- key: CriticalAppsOnly | ||
operator: Exists |
26 changes: 26 additions & 0 deletions
26
.../ingress-azure/tests/snapshots/sample-config-addon/ingress-azure/templates/configmap.yaml
This file contains 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,26 @@ | ||
--- | ||
# Source: ingress-azure/templates/configmap.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: release-name-cm-ingress-azure | ||
labels: | ||
app: ingress-azure | ||
chart: ingress-azure-1.6.0 | ||
heritage: Helm | ||
release: release-name | ||
data: | ||
APPGW_VERBOSITY_LEVEL: "3" | ||
MULTI_CLUSTER_MODE: "false" | ||
HTTP_SERVICE_PORT: "8123" | ||
APPGW_SUBSCRIPTION_ID: "0000-0000-0000-0000-00000000" | ||
APPGW_RESOURCE_GROUP: "resgp" | ||
APPGW_NAME: "gateway" | ||
APPGW_SUBNET_NAME: "gateway-subnet" | ||
KUBERNETES_WATCHNAMESPACE: "a,b,c" | ||
AZURE_CLIENT_ID: "0000-0000-0000-0000-00000000" | ||
USE_MANAGED_IDENTITY_FOR_POD: "true" | ||
INGRESS_CLASS_RESOURCE_ENABLED: "true" | ||
INGRESS_CLASS_RESOURCE_NAME: "azure-application-gateway" | ||
INGRESS_CLASS_RESOURCE_CONTROLLER: "azure/application-gateway" | ||
ADDON_MODE: "true" |
108 changes: 108 additions & 0 deletions
108
...ingress-azure/tests/snapshots/sample-config-addon/ingress-azure/templates/deployment.yaml
This file contains 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,108 @@ | ||
--- | ||
# Source: ingress-azure/templates/deployment.yaml | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: release-name-ingress-azure | ||
labels: | ||
app: ingress-azure | ||
chart: ingress-azure-1.6.0 | ||
heritage: Helm | ||
release: release-name | ||
spec: | ||
replicas: 1 # TODO: Make configurable when leader election is supported. | ||
selector: | ||
matchLabels: | ||
app: ingress-azure | ||
release: release-name | ||
template: | ||
metadata: | ||
labels: | ||
app: ingress-azure | ||
release: release-name | ||
aadpodidbinding: release-name-ingress-azure | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
prometheus.io/port: "8123" | ||
custom-annotation: custom-value | ||
spec: | ||
serviceAccountName: release-name-sa-ingress-azure | ||
securityContext: | ||
runAsGroup: 3000 | ||
runAsUser: 3000 | ||
containers: | ||
- name: ingress-azure | ||
image: mcr.microsoft.com/azure-application-gateway/kubernetes-ingress:1.6.0 | ||
imagePullPolicy: Always | ||
readinessProbe: | ||
httpGet: | ||
path: /health/ready | ||
port: 8123 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
livenessProbe: | ||
httpGet: | ||
path: /health/alive | ||
port: 8123 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 100Mi | ||
requests: | ||
cpu: 100m | ||
memory: 100Mi | ||
securityContext: | ||
readOnlyRootFilesystem: "true" | ||
env: | ||
- name: AZURE_CLOUD_PROVIDER_LOCATION | ||
value: /etc/appgw/azure.json | ||
- name: AGIC_POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: AGIC_POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
envFrom: | ||
- configMapRef: | ||
name: release-name-cm-ingress-azure | ||
volumeMounts: | ||
- name: azure | ||
mountPath: /etc/appgw/ | ||
readOnly: true | ||
- mountPath: /etc/contoso/ | ||
name: contoso | ||
readOnly: true | ||
volumes: | ||
- name: azure | ||
hostPath: | ||
path: /etc/kubernetes/ | ||
type: Directory | ||
- hostPath: | ||
path: /etc/contoso/ | ||
type: Directory | ||
name: contoso | ||
nodeSelector: | ||
beta.kubernetes.io/os: linux | ||
affinity: | ||
nodeAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- preference: | ||
matchExpressions: | ||
- key: kubernetes.cloud.com/mode | ||
operator: In | ||
values: | ||
- system | ||
weight: 100 | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- labelSelector: null | ||
matchExpressions: | ||
- key: kubernetes.cloud.com/cluster | ||
operator: Exists | ||
tolerations: | ||
- key: CriticalAppsOnly | ||
operator: Exists |
10 changes: 10 additions & 0 deletions
10
...gress-azure/tests/snapshots/sample-config-addon/ingress-azure/templates/ingressclass.yaml
This file contains 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 @@ | ||
--- | ||
# Source: ingress-azure/templates/ingressclass.yaml | ||
apiVersion: networking.k8s.io/v1 | ||
kind: IngressClass | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: controller | ||
name: azure-application-gateway | ||
spec: | ||
controller: azure/application-gateway |
11 changes: 11 additions & 0 deletions
11
...ess-azure/tests/snapshots/sample-config-addon/ingress-azure/templates/serviceaccount.yaml
This file contains 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,11 @@ | ||
--- | ||
# Source: ingress-azure/templates/serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app: ingress-azure | ||
chart: ingress-azure-1.6.0 | ||
heritage: Helm | ||
release: release-name | ||
name: release-name-sa-ingress-azure |