From 43df22b0a2f29e7342c1200293fd9beeacba5778 Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Thu, 9 Dec 2021 17:40:20 +0530 Subject: [PATCH 01/14] Update values.yaml --- solutions/monitoring_openTelemetry/helm/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solutions/monitoring_openTelemetry/helm/values.yaml b/solutions/monitoring_openTelemetry/helm/values.yaml index fcddfa709..2cd2d1050 100644 --- a/solutions/monitoring_openTelemetry/helm/values.yaml +++ b/solutions/monitoring_openTelemetry/helm/values.yaml @@ -13,11 +13,11 @@ application: # Ingress configuration ingress: application: - host: "application.localhost" + host: "application.1399f2c255cf44ac8c5a.westeurope.aksapp.io" port: 8080 jaeger: - host: "jaeger.localhost" + host: "jaeger.1399f2c255cf44ac8c5a.westeurope.aksapp.io" port: 16686 grafana: - host: "grafana.localhost" - port: 3000 \ No newline at end of file + host: "grafana.1399f2c255cf44ac8c5a.westeurope.aksapp.io" + port: 3000 From f4366331f239307b63cc2aabafe4288b385774f7 Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Thu, 9 Dec 2021 17:42:22 +0530 Subject: [PATCH 02/14] Update ingress.yaml --- .../monitoring_openTelemetry/helm/templates/ingress.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml b/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml index d0539ba7e..f9e90c95f 100644 --- a/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml +++ b/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml @@ -2,6 +2,10 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress + #adding azure addon annotation for http application routing + annotations: + kubernetes.io/ingress.class: addon-http-application-routing +spec: spec: rules: - host: {{ .Values.ingress.application.host }} @@ -33,4 +37,4 @@ spec: service: name: grafana port: - number: {{ .Values.ingress.grafana.port }} \ No newline at end of file + number: {{ .Values.ingress.grafana.port }} From b012663f69eada4527610724c817823726d51d6b Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Wed, 6 Apr 2022 09:09:32 +0530 Subject: [PATCH 03/14] Create IngressSetupAKS.asciidoc --- .../IngressSetupAKS.asciidoc | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc diff --git a/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc b/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc new file mode 100644 index 000000000..62932256c --- /dev/null +++ b/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc @@ -0,0 +1,24 @@ +== AZURE: +The HTTP application routing add-on is designed to let you quickly create an ingress controller and access your applications. +This add-on is not currently designed for use in a production environment and is not recommended for production use. + +Following steps to enable HTTP application routing. + +. Enable HTTP routing on existing AKS cluster using the `az aks enable-addons` with the Azure CLI + + az aks enable-addons --resource-group myResourceGroup --name myAKSCluster --addons http_application_routing + + +. use the `az aks show` command to retrieve the DNS zone name. + + az aks show --resource-group myResourceGroup --name myAKSCluster --query addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName -o table + +. Adding annotations + + annotations: + kubernetes.io/ingress.class: addon-http-application-routing + +. Change your ingress host with http application DNS Zone name. + + host: xxxxx.xxxxxx.xxxx.region.aksapp.io + From 1e4ae681d38e9270eae4277c1905468aa31f6adc Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Tue, 12 Apr 2022 12:24:00 +0530 Subject: [PATCH 04/14] Update IngressSetupAKS.asciidoc --- .../IngressSetupAKS.asciidoc | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc b/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc index 62932256c..541a84875 100644 --- a/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc +++ b/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc @@ -1,4 +1,4 @@ -== AZURE: +== HTTP application routing in Azure: The HTTP application routing add-on is designed to let you quickly create an ingress controller and access your applications. This add-on is not currently designed for use in a production environment and is not recommended for production use. @@ -22,3 +22,27 @@ Following steps to enable HTTP application routing. host: xxxxx.xxxxxx.xxxx.region.aksapp.io +== Nginx-ingress-controller-setup: + +Install Nginx ingress controller in kubernetes cluster by using helm chart. + +* Adding the Helm repository, if you’re installing the chart via the helm repository. + + helm repo add bitnami https://charts.bitnami.com/bitnami + +* Upgrading the Chart + + helm repo update + +* Installing the Chart +If you have Helm, you can deploy the ingress controller with the following command: + +AWS - EKS: + + helm upgrade --install nginx-ingress nginx-ingress-controller --set ingressClassResource.default=true --set containerSecurityContext.allowPrivilegeEscalation=false --repo https://charts.bitnami.com/bitnami --namespace nginx-ingress --create-namespace + +AZURE - AKS: + + helm install nginx-stable nginx-stable/nginx-ingress --set controller.setAsDefaultIngress=true --namespace nginx-ingress --create-namespace + + From 42cd57cfd1fb6d273bdde99021d0abce7bb37a79 Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Tue, 12 Apr 2022 12:39:17 +0530 Subject: [PATCH 05/14] Update values.yaml --- solutions/monitoring_openTelemetry/helm/values.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/solutions/monitoring_openTelemetry/helm/values.yaml b/solutions/monitoring_openTelemetry/helm/values.yaml index 2cd2d1050..150043c74 100644 --- a/solutions/monitoring_openTelemetry/helm/values.yaml +++ b/solutions/monitoring_openTelemetry/helm/values.yaml @@ -1,5 +1,6 @@ # Application configuration application: + cloud: "" # Configuration to get the metrics information metrics: jobname: "metrics-jobname" @@ -12,12 +13,17 @@ application: # Ingress configuration ingress: + aws: + annotations: {} + azure: + annotations: { + kubernetes.io/ingress.class: addon-http-application-routing + } + #hostname should be passed on helm install + host: "" application: - host: "application.1399f2c255cf44ac8c5a.westeurope.aksapp.io" port: 8080 jaeger: - host: "jaeger.1399f2c255cf44ac8c5a.westeurope.aksapp.io" port: 16686 grafana: - host: "grafana.1399f2c255cf44ac8c5a.westeurope.aksapp.io" port: 3000 From 7362be391c464ed85bf054929c7d08f44d8ae3c7 Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Tue, 12 Apr 2022 12:39:54 +0530 Subject: [PATCH 06/14] Create _helpers.tpl --- .../helm/templates/_helpers.tpl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 solutions/monitoring_openTelemetry/helm/templates/_helpers.tpl diff --git a/solutions/monitoring_openTelemetry/helm/templates/_helpers.tpl b/solutions/monitoring_openTelemetry/helm/templates/_helpers.tpl new file mode 100644 index 000000000..0df3b7a7e --- /dev/null +++ b/solutions/monitoring_openTelemetry/helm/templates/_helpers.tpl @@ -0,0 +1,14 @@ +{{/* +Prepare ingress host, pass it as parameter. +*/}} +{{- define "ingress.application.host" -}} +{{- printf "application.%s" .Values.ingress.host -}} +{{- end -}} + +{{- define "ingress.jaeger.host" -}} +{{- printf "jaeger.%s" .Values.ingress.host -}} +{{- end -}} + +{{- define "ingress.grafana.host" -}} +{{- printf "grafana.%s" .Values.ingress.host -}} +{{- end -}} From cc2069fd30ef36ba3dbc3387c8d563fd862d559e Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Tue, 12 Apr 2022 12:40:18 +0530 Subject: [PATCH 07/14] Update ingress.yaml --- .../helm/templates/ingress.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml b/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml index f9e90c95f..0d5bacf65 100644 --- a/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml +++ b/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml @@ -4,11 +4,15 @@ metadata: name: ingress #adding azure addon annotation for http application routing annotations: - kubernetes.io/ingress.class: addon-http-application-routing -spec: + {{- if contains $.Values.application.cloud "AWS" }} + {{ toYaml .Values.ingress.aws.annotations | indent 2 }} + {{- end }} + {{- if contains $.Values.application.cloud "AZURE" }} + {{ toYaml .Values.ingress.azure.annotations | indent 2 }} + {{- end }} spec: rules: - - host: {{ .Values.ingress.application.host }} + - host: {{ template "ingress.application.host" . }} http: paths: - path: "/" @@ -18,7 +22,7 @@ spec: name: {{ .Values.application.service.name }} port: number: {{ .Values.ingress.application.port }} - - host: {{ .Values.ingress.jaeger.host }} + - host: {{ template "ingress.jaeger.host" . }} http: paths: - path: "/" @@ -28,7 +32,7 @@ spec: name: jaeger-all-in-one port: number: {{ .Values.ingress.jaeger.port }} - - host: {{ .Values.ingress.grafana.host }} + - host: {{ template "ingress.grafana.host" . }} http: paths: - path: "/" From 4b7f6303f4ed8ea8f50409f09004b6700445ad63 Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Tue, 12 Apr 2022 13:24:07 +0530 Subject: [PATCH 08/14] Update IngressSetupAKS.asciidoc --- solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc b/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc index 541a84875..a5c2b6215 100644 --- a/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc +++ b/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc @@ -44,5 +44,10 @@ AWS - EKS: AZURE - AKS: helm install nginx-stable nginx-stable/nginx-ingress --set controller.setAsDefaultIngress=true --namespace nginx-ingress --create-namespace + +== Examples +=== Providing Dynamic Values to Helm chart +When installing Helm charts with the helm install command, the `--set` argument allows you to define value in a values.yaml file, `application.cloud` is deployment environment, aws or azure, `ingress.application.host` is to set host value. + helm install otlp ./helm --set application.cloud="AWS" --set ingress.application.host="xxx.com" From 2255b6bf3e8bd714f237c033dbf6f68310409a8f Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Wed, 18 May 2022 08:57:20 +0530 Subject: [PATCH 09/14] Update ingress.yaml --- .../monitoring_openTelemetry/helm/templates/ingress.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml b/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml index 0d5bacf65..3f0cb55d7 100644 --- a/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml +++ b/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml @@ -2,11 +2,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress - #adding azure addon annotation for http application routing annotations: - {{- if contains $.Values.application.cloud "AWS" }} - {{ toYaml .Values.ingress.aws.annotations | indent 2 }} - {{- end }} {{- if contains $.Values.application.cloud "AZURE" }} {{ toYaml .Values.ingress.azure.annotations | indent 2 }} {{- end }} From 7884879b591c5b302d9adf830d647a2f370b7dd2 Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Wed, 18 May 2022 09:39:50 +0530 Subject: [PATCH 10/14] Update values.yaml --- solutions/monitoring_openTelemetry/helm/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solutions/monitoring_openTelemetry/helm/values.yaml b/solutions/monitoring_openTelemetry/helm/values.yaml index 150043c74..385e9b50b 100644 --- a/solutions/monitoring_openTelemetry/helm/values.yaml +++ b/solutions/monitoring_openTelemetry/helm/values.yaml @@ -1,6 +1,6 @@ # Application configuration application: - cloud: "" + cloud: "" # AWS or AZURE # Configuration to get the metrics information metrics: jobname: "metrics-jobname" @@ -19,7 +19,7 @@ ingress: annotations: { kubernetes.io/ingress.class: addon-http-application-routing } - #hostname should be passed on helm install + # hostname should be passed on helm install host: "" application: port: 8080 From 0d7d2bcb374bead1d6efc47f61b5f2136f3d0e3f Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Wed, 18 May 2022 09:40:56 +0530 Subject: [PATCH 11/14] Update ingress.yaml --- solutions/monitoring_openTelemetry/helm/templates/ingress.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml b/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml index 3f0cb55d7..80ddd828f 100644 --- a/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml +++ b/solutions/monitoring_openTelemetry/helm/templates/ingress.yaml @@ -3,6 +3,9 @@ kind: Ingress metadata: name: ingress annotations: + {{- if contains $.Values.application.cloud "AWS" }} + {{ toYaml .Values.ingress.aws.annotations | indent 2 }} + {{- end }} {{- if contains $.Values.application.cloud "AZURE" }} {{ toYaml .Values.ingress.azure.annotations | indent 2 }} {{- end }} From 72c748dab9989be306b2781158fb53da726d86cd Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Wed, 18 May 2022 09:43:09 +0530 Subject: [PATCH 12/14] Update IngressSetupAKS.asciidoc --- .../monitoring_openTelemetry/IngressSetupAKS.asciidoc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc b/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc index a5c2b6215..574814288 100644 --- a/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc +++ b/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc @@ -37,17 +37,13 @@ Install Nginx ingress controller in kubernetes cluster by using helm chart. * Installing the Chart If you have Helm, you can deploy the ingress controller with the following command: -AWS - EKS: - - helm upgrade --install nginx-ingress nginx-ingress-controller --set ingressClassResource.default=true --set containerSecurityContext.allowPrivilegeEscalation=false --repo https://charts.bitnami.com/bitnami --namespace nginx-ingress --create-namespace - AZURE - AKS: helm install nginx-stable nginx-stable/nginx-ingress --set controller.setAsDefaultIngress=true --namespace nginx-ingress --create-namespace == Examples === Providing Dynamic Values to Helm chart -When installing Helm charts with the helm install command, the `--set` argument allows you to define value in a values.yaml file, `application.cloud` is deployment environment, aws or azure, `ingress.application.host` is to set host value. +When installing Helm charts with the helm install command, the `--set` argument allows you to define value in a values.yaml file, `application.cloud` is deployment environment(AZURE), `ingress.host` is to set host value. - helm install otlp ./helm --set application.cloud="AWS" --set ingress.application.host="xxx.com" + helm install otlp ./helm --set application.cloud="AZURE" --set ingress.host="xxx.com" From de2d9ebcbfa1874fcac8f5ea6bfb40191331ba8d Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Fri, 10 Jun 2022 13:17:35 +0530 Subject: [PATCH 13/14] Update and rename IngressSetupAKS.asciidoc to Ingress_controller_setup_AKS.asciidoc updated with minor changes --- ... => Ingress_controller_setup_AKS.asciidoc} | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) rename solutions/monitoring_openTelemetry/{IngressSetupAKS.asciidoc => Ingress_controller_setup_AKS.asciidoc} (63%) diff --git a/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc b/solutions/monitoring_openTelemetry/Ingress_controller_setup_AKS.asciidoc similarity index 63% rename from solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc rename to solutions/monitoring_openTelemetry/Ingress_controller_setup_AKS.asciidoc index 574814288..4fc6d11b7 100644 --- a/solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc +++ b/solutions/monitoring_openTelemetry/Ingress_controller_setup_AKS.asciidoc @@ -34,13 +34,28 @@ Install Nginx ingress controller in kubernetes cluster by using helm chart. helm repo update -* Installing the Chart -If you have Helm, you can deploy the ingress controller with the following command: +* Nginx-ingress controller: Installing the Helm charts deploy the nginx ingress controller with the following command. -AZURE - AKS: + helm install nginx-ingress bitnami/nginx-ingress-controller --set ingressClassResource.default=true --set containerSecurityContext.allowPrivilegeEscalation=false --namespace nginx-ingress --create-namespace + +== Create multiple nginx controller service for multi domain access. + +1. Import already existed nginx controller service in to yaml, modify service name and re-deploy service. + + kubectl get svc nginx-ingress-nginx-ingress-controller -n nginx-ingress -o yaml > filename.yml + + Note: In Azure create Public IP addresses(domain) for nginx ingress service external IP. + +2. Redeploy service with minor changes. + + kubectl apply -f filename.yml -n nginx-ingress + +3. Setup ingress host with nginx ingress controller service domain to access application using domain. + + host: xxx.xxx.xx.com + +deploy and access application using domain. - helm install nginx-stable nginx-stable/nginx-ingress --set controller.setAsDefaultIngress=true --namespace nginx-ingress --create-namespace - == Examples === Providing Dynamic Values to Helm chart When installing Helm charts with the helm install command, the `--set` argument allows you to define value in a values.yaml file, `application.cloud` is deployment environment(AZURE), `ingress.host` is to set host value. From e5f87cc675d4c764a9f3558ec4053826ae2ff54a Mon Sep 17 00:00:00 2001 From: prathibhapadma Date: Fri, 10 Jun 2022 13:18:48 +0530 Subject: [PATCH 14/14] Update Ingress_controller_setup_AKS.asciidoc --- .../Ingress_controller_setup_AKS.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/monitoring_openTelemetry/Ingress_controller_setup_AKS.asciidoc b/solutions/monitoring_openTelemetry/Ingress_controller_setup_AKS.asciidoc index 4fc6d11b7..ccb1d535b 100644 --- a/solutions/monitoring_openTelemetry/Ingress_controller_setup_AKS.asciidoc +++ b/solutions/monitoring_openTelemetry/Ingress_controller_setup_AKS.asciidoc @@ -48,7 +48,7 @@ Install Nginx ingress controller in kubernetes cluster by using helm chart. 2. Redeploy service with minor changes. - kubectl apply -f filename.yml -n nginx-ingress + kubectl apply -f nginx_controller_service.yml -n nginx-ingress 3. Setup ingress host with nginx ingress controller service domain to access application using domain.