Crude Coffee, Clumsy Code

Stonian
1 min readMay 9, 2022
Wakeup-juice. PSYCH.

It took me the best part of half an hour this morning to translate this:

apk add --update --no-cache wget git && \
wget https://get.helm.sh/helm-v3.8.1-linux-amd64.tar.gz -O - | tar -xz && \
mv linux-amd64/helm /usr/bin/helm && \
chmod +x /usr/bin/helm && \
rm -rf linux-amd64

chmod +x /usr/bin/helm

make gcloud_set_project GCP_PROJ_ID=${project_id}
make gcloud_gcp_auth GCP_PROJ_ID=${project_id}
gcloud container clusters get-credentials ${gke_cluster} --region ${region} --project ${project_id}
kubectl config use-context gke_${project_id}_${region}_${gke_cluster}

kubectl create namespace airflow
kubectl config set-context --current --namespace=airflow
kubectl apply -f ../helm-chart/managed-cert.yaml

helm repo add apache-airflow https://airflow.apache.org
helm upgrade --install airflow apache-airflow/airflow -f ../helm-chart/values.yaml --namespace airflow

into this:

resource "helm_release" "managed_cert" {
name = "managed_cert"
chart = "../helm-chart/managed-cert.yaml"
}
resource "helm_release" "example" {
name = "airflow"
repository = "https://airflow.apache.org"
chart = "airflow"

values = [
"${file("../helm-chart/values.yaml")}"
]
}

I blame no-one but myself. The decaf coffee beans were moved to the back of the furthest cupboard.

--

--

Stonian

Father | Amateur-barista | Hobby-cook | Clumsy-coder | Human &> /dev/null