This repo is a playground/demo for use of Argo CD (docs).
It contains examples for runnin up a kubernetes cluster either locally or on a cloud provider (see "Set up a Kubernetes cluster" below), an example "helloworld" app, and other sundry examples.
- A GitHub account (other repositories are available)
- Homebrew is installed (assumes mac)
Note: This guide assumes the use of MacOS with permissions to be able to install various apps
See:
From here, we assume kubectl
is installed/authenticated.
See here to set up the OAuth app in github.
Then run installDrone.sh with the github oauth client ID and secret.
Let's recall the name from our container registry from earlier.
e.g., on Azure, our args.sh variables would be defined as:
export MY_CLUSTER_NAME=...
export MY_GROUP_NAME=...
export MY_REGISTRY_NAME=...
az aks check-acr -n "$MY_CLUSTER_NAME" -g "$MY_GROUP_NAME" --acr "$MY_REGISTRY_NAME"
To get the ACR we would run:
MY_ACR_SCOPE=$(az acr show --name s"${MY_REGISTRY_NAME:?}" --query "id" --output tsv)
Create a service principle for the container registry
[[ -z "${MY_APP_PRINCIPAL}" ]] && export MY_APP_PRINCIPAL="${MY_APP_NAME}Principle"
export MY_ACRPUSH_PWD=$(az ad sp create-for-rbac --name "${MY_APP_PRINCIPAL:?}" --scopes "${MY_ACR_SCOPE:?}" --role acrpush --query "password" --output tsv)
export MY_ACRPUSH_USR=$(az ad sp list --display-name "${MY_APP_PRINCIPAL:?}" --query "[].appId" --output tsv)
--
- 'service.beta.kubernetes.io/azure-dns-label-name: mydroneapp' doesn't seem to be honored