Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions solutions/monitoring_openTelemetry/IngressSetupAKS.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
== 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.

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

== 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expected only AKS in this document and not AWS EKS

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified document only for AKS


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"

14 changes: 14 additions & 0 deletions solutions/monitoring_openTelemetry/helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -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 -}}
16 changes: 12 additions & 4 deletions solutions/monitoring_openTelemetry/helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ 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 }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. The comment irritates me.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

{{- 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: "/"
Expand All @@ -14,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: "/"
Expand All @@ -24,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: "/"
Expand All @@ -33,4 +41,4 @@ spec:
service:
name: grafana
port:
number: {{ .Values.ingress.grafana.port }}
number: {{ .Values.ingress.grafana.port }}
14 changes: 10 additions & 4 deletions solutions/monitoring_openTelemetry/helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Application configuration
application:
cloud: ""
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would define the possible values for cloud in a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

# Configuration to get the metrics information
metrics:
jobname: "metrics-jobname"
Expand All @@ -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.localhost"
port: 8080
jaeger:
host: "jaeger.localhost"
port: 16686
grafana:
host: "grafana.localhost"
port: 3000
port: 3000