Skip to content

Commit cba7004

Browse files
akshaysnguptaerickhernandezascencioRaphael BickelbeandradKeisukeYamashita
authored
Merge master into release/1.5 (#1332)
* doc changes (#1204) Co-authored-by: Akshay Gupta <[email protected]> * Add cookie-based-affinity-distinct-name annotation (#1280) * Add cookie-based-affinity-distinct-name annotation * Add ServiceFullNameHash in internalTypes.go * cookie name test * Add log * Add functional testing for distinct cookie name * Add documenation * Prefix appgw-affinity- for distinct cookie names * fix functional test * fix functional test Co-authored-by: Akshay Gupta <[email protected]> * rewrite: Add support for rewrite rule set assignment (#1287) * Add support for rewrite rule set assignment So that rewrite rule sets predefined in the app gateway can be assigned to routing rules by adding an annotation in the corresponding Ingress. Fixes #1003. Related to #462. * remove listener ingress Co-authored-by: Akshay Gupta <[email protected]> * Fix typo Greenfeild (#1305) Signed-off-by: KeisukeYamashita <[email protected]> * fix: indentation error in helm values file (#1301) * fixed indentation error in helm values file * applied change to values-template.yaml file Co-authored-by: Akshay Gupta <[email protected]> * doc: format future readings section in "How to setup networking between Application Gateway and AKS" doc (#1297) Co-authored-by: Akshay Gupta <[email protected]> * fix: port reference by name in ingress (#1322) * template: update aks default version in greenfield deploy templates (#1319) * update aks default version * small docs updates * small modifications * update windows guide * Fixing broken link (#1320) Co-authored-by: Akshay Gupta <[email protected]> * networking/v1: Add ingress class support (#1329) * support ingress class * add unit tests * add test for default * add e2e test * test: add e2e test for rewrite-rule-set annotation; fix helm test (#1330) * test: add test for rewrite-rule-set annotation * add install task * use the latest helm to generate * add comment Co-authored-by: erickhernandezascencio <[email protected]> Co-authored-by: Raphael Bickel <[email protected]> Co-authored-by: Isabel Andrade <[email protected]> Co-authored-by: KeisukeYamashita <[email protected]> Co-authored-by: jiayang <[email protected]> Co-authored-by: heoelri <[email protected]> Co-authored-by: Will Dewhurst <[email protected]>
1 parent 24b21dc commit cba7004

File tree

87 files changed

+1720
-453
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1720
-453
lines changed

.pipelines/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ steps:
1212
echo '##vso[task.prependpath]$(GOROOT)/bin'
1313
displayName: "Set up the Go workspace"
1414
15+
- task: HelmInstaller@1
16+
displayName: Helm installer
17+
inputs:
18+
helmVersionToInstall: latest
19+
1520
- script: make lint-all
1621
workingDirectory: "$(modulePath)"
1722
displayName: "Go and Helm lint check"

cmd/appgw-ingress/main.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ func main() {
8383

8484
env.Consolidate(cpConfig)
8585

86-
// adjust ingress class value if overridden by environment variable
87-
setIngressClass(env.IngressClass)
88-
8986
// Workaround for "ERROR: logging before flag.Parse"
9087
// See: https://github.com/kubernetes/kubernetes/issues/17162#issuecomment-225596212
9188
_ = flag.CommandLine.Parse([]string{})
@@ -99,11 +96,11 @@ func main() {
9996
crdClient := versioned.NewForConfigOrDie(apiConfig)
10097
istioCrdClient := istio.NewForConfigOrDie(apiConfig)
10198
multiClusterCrdClient := multicluster.NewForConfigOrDie(apiConfig)
102-
recorder := getEventRecorder(kubeClient)
99+
recorder := getEventRecorder(kubeClient, env.IngressClassControllerName)
103100
namespaces := getNamespacesToWatch(env.WatchNamespace)
104101
metricStore := metricstore.NewMetricStore(env)
105102
metricStore.Start()
106-
k8sContext := k8scontext.NewContext(kubeClient, crdClient, multiClusterCrdClient, istioCrdClient, namespaces, *resyncPeriod, metricStore)
103+
k8sContext := k8scontext.NewContext(kubeClient, crdClient, multiClusterCrdClient, istioCrdClient, namespaces, *resyncPeriod, metricStore, env)
107104
agicPod := k8sContext.GetAGICPod(env)
108105

109106
if err := environment.ValidateEnv(env); err != nil {

cmd/appgw-ingress/utils.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"k8s.io/client-go/tools/record"
2323
"k8s.io/klog/v2"
2424

25-
"github.com/Azure/application-gateway-kubernetes-ingress/pkg/annotations"
2625
"github.com/Azure/application-gateway-kubernetes-ingress/pkg/controllererrors"
2726
agiccrdscheme "github.com/Azure/application-gateway-kubernetes-ingress/pkg/crd_client/agic_crd_client/clientset/versioned/scheme"
2827
"github.com/Azure/application-gateway-kubernetes-ingress/pkg/environment"
@@ -86,7 +85,7 @@ func getKubeClientConfig() *rest.Config {
8685
return config
8786
}
8887

89-
func getEventRecorder(kubeClient kubernetes.Interface) record.EventRecorder {
88+
func getEventRecorder(kubeClient kubernetes.Interface, ingressClassControllerName string) record.EventRecorder {
9089
eventBroadcaster := record.NewBroadcaster()
9190
eventBroadcaster.StartLogging(klog.V(5).Infof)
9291
sink := &typedcorev1.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}
@@ -97,7 +96,7 @@ func getEventRecorder(kubeClient kubernetes.Interface) record.EventRecorder {
9796
hostname = "unknown-hostname"
9897
}
9998
source := v1.EventSource{
100-
Component: annotations.ApplicationGatewayIngressClass,
99+
Component: ingressClassControllerName,
101100
Host: hostname,
102101
}
103102

@@ -115,9 +114,3 @@ func getVerbosity(flagVerbosity int, envVerbosity string) int {
115114
klog.Infof("Using verbosity level %d from environment variable %s", envVerbosityInt, environment.VerbosityLevelVarName)
116115
return envVerbosityInt
117116
}
118-
119-
func setIngressClass(customIngressClass string) {
120-
if customIngressClass != "" {
121-
annotations.ApplicationGatewayIngressClass = customIngressClass
122-
}
123-
}

deploy/azuredeploy.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
}
282282
},
283283
"kubernetesVersion": {
284-
"defaultValue": "1.20.7",
284+
"defaultValue": "1.20.9",
285285
"type": "string",
286286
"metadata": {
287287
"description": "The version of Kubernetes."

deploy/azuredeploywindowscluster.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
}
282282
},
283283
"kubernetesVersion": {
284-
"defaultValue": "1.15.7",
284+
"defaultValue": "1.20.9",
285285
"type": "string",
286286
"metadata": {
287287
"description": "The version of Kubernetes."

0 commit comments

Comments
 (0)