azure: allow to configure a kubernetes cluster for a gitlab hosting
Related to T4046
Unfortunately, it's not possible to assign an static ip address to the private endpoint without using a load balancer
Remaining tasks:
-
Test the public ip allocation The public ip is allocated when the ingress controllers are created by the gitlab operator -
try to deploy the gitlab operator with terraform It doesn't seem to suit our needs. The kubernetes provider [1] is oriented to deploy components explicitly configured by terraform and not through a yaml file. It also has the problem of the local cluster configuration as the cluster fqdn must be declared in the local /etc/hosts to be able to interact with it (due to the certificate verification). -
move the aks configuration outside the gitlab module The gitlab module now relies on a kubernetes modules that can be used independently to instantiate an aks cluster not related to gitlab -
[1] https://registry.terraform.io/providers/hashicorp/kubernetes/1.11.0/docs
Test Plan
terraform init
terraform plan
terraform apply
Outputs:
gitlab-staging_summary = <<EOT
name: gitlab-aks-staging
internal_ip: 192.168.200.15
Execute the following command to add the credentials on your .kube/config:
az aks get-credentials --resource-group euwest-gitlab-staging --name gitlab-aks-staging
and add this line in your /etc/hosts file:
192.168.200.15 gitlab-staging-bc4cea78.dae2fa98-fd73-4919-b260-c77bf7cf991c.privatelink.westeurope.azmk8s.io
EOT
Migrated from D7419 (view on Phabricator)