Skip to content

Commit

Permalink
Merge master into release/1.5 (#1332)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
8 people authored Feb 2, 2022
1 parent 24b21dc commit cba7004
Show file tree
Hide file tree
Showing 87 changed files with 1,720 additions and 453 deletions.
5 changes: 5 additions & 0 deletions .pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ steps:
echo '##vso[task.prependpath]$(GOROOT)/bin'
displayName: "Set up the Go workspace"
- task: HelmInstaller@1
displayName: Helm installer
inputs:
helmVersionToInstall: latest

- script: make lint-all
workingDirectory: "$(modulePath)"
displayName: "Go and Helm lint check"
Expand Down
7 changes: 2 additions & 5 deletions cmd/appgw-ingress/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ func main() {

env.Consolidate(cpConfig)

// adjust ingress class value if overridden by environment variable
setIngressClass(env.IngressClass)

// Workaround for "ERROR: logging before flag.Parse"
// See: https://github.com/kubernetes/kubernetes/issues/17162#issuecomment-225596212
_ = flag.CommandLine.Parse([]string{})
Expand All @@ -99,11 +96,11 @@ func main() {
crdClient := versioned.NewForConfigOrDie(apiConfig)
istioCrdClient := istio.NewForConfigOrDie(apiConfig)
multiClusterCrdClient := multicluster.NewForConfigOrDie(apiConfig)
recorder := getEventRecorder(kubeClient)
recorder := getEventRecorder(kubeClient, env.IngressClassControllerName)
namespaces := getNamespacesToWatch(env.WatchNamespace)
metricStore := metricstore.NewMetricStore(env)
metricStore.Start()
k8sContext := k8scontext.NewContext(kubeClient, crdClient, multiClusterCrdClient, istioCrdClient, namespaces, *resyncPeriod, metricStore)
k8sContext := k8scontext.NewContext(kubeClient, crdClient, multiClusterCrdClient, istioCrdClient, namespaces, *resyncPeriod, metricStore, env)
agicPod := k8sContext.GetAGICPod(env)

if err := environment.ValidateEnv(env); err != nil {
Expand Down
11 changes: 2 additions & 9 deletions cmd/appgw-ingress/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"k8s.io/client-go/tools/record"
"k8s.io/klog/v2"

"github.com/Azure/application-gateway-kubernetes-ingress/pkg/annotations"
"github.com/Azure/application-gateway-kubernetes-ingress/pkg/controllererrors"
agiccrdscheme "github.com/Azure/application-gateway-kubernetes-ingress/pkg/crd_client/agic_crd_client/clientset/versioned/scheme"
"github.com/Azure/application-gateway-kubernetes-ingress/pkg/environment"
Expand Down Expand Up @@ -86,7 +85,7 @@ func getKubeClientConfig() *rest.Config {
return config
}

func getEventRecorder(kubeClient kubernetes.Interface) record.EventRecorder {
func getEventRecorder(kubeClient kubernetes.Interface, ingressClassControllerName string) record.EventRecorder {
eventBroadcaster := record.NewBroadcaster()
eventBroadcaster.StartLogging(klog.V(5).Infof)
sink := &typedcorev1.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}
Expand All @@ -97,7 +96,7 @@ func getEventRecorder(kubeClient kubernetes.Interface) record.EventRecorder {
hostname = "unknown-hostname"
}
source := v1.EventSource{
Component: annotations.ApplicationGatewayIngressClass,
Component: ingressClassControllerName,
Host: hostname,
}

Expand All @@ -115,9 +114,3 @@ func getVerbosity(flagVerbosity int, envVerbosity string) int {
klog.Infof("Using verbosity level %d from environment variable %s", envVerbosityInt, environment.VerbosityLevelVarName)
return envVerbosityInt
}

func setIngressClass(customIngressClass string) {
if customIngressClass != "" {
annotations.ApplicationGatewayIngressClass = customIngressClass
}
}
2 changes: 1 addition & 1 deletion deploy/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
}
},
"kubernetesVersion": {
"defaultValue": "1.20.7",
"defaultValue": "1.20.9",
"type": "string",
"metadata": {
"description": "The version of Kubernetes."
Expand Down
2 changes: 1 addition & 1 deletion deploy/azuredeploywindowscluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
}
},
"kubernetesVersion": {
"defaultValue": "1.15.7",
"defaultValue": "1.20.9",
"type": "string",
"metadata": {
"description": "The version of Kubernetes."
Expand Down
Loading

0 comments on commit cba7004

Please sign in to comment.