49 lines
1.9 KiB
Makefile
Executable File
49 lines
1.9 KiB
Makefile
Executable File
SHELL := /bin/bash
|
|
|
|
ENGINE=kind
|
|
HARBOR_USER_NAME=afornerot
|
|
CLUSTER_NAME=nineskeletor
|
|
NAMESPACE=app-dev
|
|
POD=$(shell kubectl get pods --namespace=${NAMESPACE} --no-headers -o custom-columns=":metadata.name" | grep ^${CLUSTER_NAME}-${PODNAME})
|
|
PODTOOLS=$(shell kubectl get pods --namespace=${NAMESPACE} --no-headers -o custom-columns=":metadata.name" | grep ^${CLUSTER_NAME}-adminer)
|
|
|
|
deletecluster:
|
|
${ENGINE} delete cluster --name=${CLUSTER_NAME}
|
|
|
|
createcluster:
|
|
${ENGINE} delete cluster --name=${CLUSTER_NAME}
|
|
${ENGINE} create cluster --config misc/k8s/${ENGINE}/${ENGINE}-cluster.yaml
|
|
|
|
atachcluster:
|
|
docker login reg.cadoles.com
|
|
mkdir -p misc/k8s/kustomization/base/secrets/dockerconfig
|
|
docker --config misc/k8s/kustomization/base/secrets/dockerconfig login reg.cadoles.com
|
|
mv misc/k8s/kustomization/base/secrets/dockerconfig/config.json misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson
|
|
mkdir -p misc/k8s/kustomization/overlays/dev/secrets/dockerconfig
|
|
cp misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson misc/k8s/kustomization/overlays/dev/secrets/dockerconfig/.dockerconfigjson
|
|
|
|
applycluster:
|
|
kubectl apply -k misc/k8s/${ENGINE}/cluster --server-side
|
|
|
|
applylbcluster:
|
|
kubectl apply -k misc/k8s/${ENGINE}/cluster/lb --server-side
|
|
|
|
watchcluster:
|
|
skaffold dev -p dev --cleanup=false --default-repo reg.cadoles.com/${HARBOR_USER_NAME}
|
|
|
|
sh:
|
|
kubectl exec --namespace=${NAMESPACE} ${POD} -it -- sh
|
|
|
|
deletenamespace:
|
|
kubectl delete all --all --namespace ${NAMESPACE}
|
|
|
|
getpods:
|
|
kubectl get pods --namespace ${NAMESPACE}
|
|
|
|
getservices:
|
|
kubectl get services --namespace ${NAMESPACE}
|
|
|
|
ldapsearch:
|
|
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- apk update
|
|
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- apk add openldap
|
|
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- ldapsearch -x -H ldap://nineskeletor-openldap:389 -D cn=admin,dc=nine,dc=fr -w openldap
|