WIP

parent 17a04505
REPO := registry.gitlab.com/gitlab-examples/openshift-deploy:latest
REPO := registry.gitlab.com/ayufan/kubernetes-deploy-demo:latest
build:
docker build -t $(REPO) .
......
......@@ -30,7 +30,9 @@ kind: Namespace
apiVersion: v1
metadata:
name: $KUBE_NAMESPACE
---
EOF
cat <<EOF | kubectl apply -n $KUBE_NAMESPACE -f -
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
......
......@@ -10,8 +10,9 @@ create_kubeconfig() {
export KUBECONFIG="$(pwd)/kubeconfig"
export KUBE_CLUSTER_OPTIONS=
if [[ -n "$KUBE_CA_PEM" ]]; then
cat "$KUBE_CA_PEM" > "$(pwd)/kube.ca.pem"
export KUBE_CLUSTER_OPTIONS=--certificate-authority=KUBE_CA_PEM
echo "Using KUBE_CA_PEM..."
echo "$KUBE_CA_PEM" > "$(pwd)/kube.ca.pem"
export KUBE_CLUSTER_OPTIONS=--certificate-authority="$(pwd)/kube.ca.pem"
fi
kubectl config set-cluster gitlab-deploy --server="$KUBE_URL" \
$KUBE_CLUSTER_OPTIONS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment