Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 934534b

Browse files
author
Erik
authored
Merge pull request #8 from techgnosis/Jenkins
Fixing Jenkins related kubectl failures
2 parents 434bb1f + 0f2032f commit 934534b

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SHELL := /usr/bin/env bash
1818
# All is the first target in the file so it will get picked up when you just run 'make' on its own
1919
linting: check_shell check_python check_golang check_terraform check_docker check_base_files check_headers check_trailing_whitespace
2020

21-
SQLNAME := demo-postgres-6
21+
SQLNAME := demo-postgres-7
2222

2323
# The .PHONY directive tells make that this isn't a real target and so
2424
# the presence of a file named 'check_shell' won't cause this target to stop

scripts/configs_and_secrets.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
# Here we are installing secrets into the Kubernetes cluster
1818
# Installing them into the cluster makes it very easy to access them from
1919
# the appliations in the cluster
20-
kubectl create secret generic cloudsql-sa-creds \
20+
kubectl --namespace default create secret generic cloudsql-sa-creds \
2121
--from-file=credentials.json=credentials.json
2222

23-
kubectl create secret generic pgadmin-console \
23+
kubectl --namespace default create secret generic pgadmin-console \
2424
--from-literal=user="$PG_ADMIN_CONSOLE_EMAIL" \
2525
--from-literal=password="$PG_ADMIN_CONSOLE_PASSWORD"
2626

@@ -30,5 +30,5 @@ CONNECTION_NAME=$(gcloud sql instances describe "$INSTANCE_NAME" \
3030
# You can also store non-sensitive information in the cluster
3131
# similar to a secret. In this case we are using a configMap, which
3232
# is also very easy to access from applications in the cluster
33-
kubectl create configmap connectionname \
33+
kubectl --namespace default create configmap connectionname \
3434
--from-literal=connectionname="$CONNECTION_NAME"

scripts/expose.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
# Cloud Load Balancer we are instead port-forwarding to the node and
1919
# exposing the pod port
2020

21-
POD_ID=$(kubectl get pods -o name | cut -d '/' -f 2)
22-
kubectl port-forward "$POD_ID" 8080:80
21+
POD_ID=$(kubectl --namespace default get pods -o name | cut -d '/' -f 2)
22+
kubectl --namespace default port-forward "$POD_ID" 8080:80

scripts/pgadmin_deployment.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
ROOT=$(dirname "${BASH_SOURCE[0]}")
2222

23-
kubectl create -f "$ROOT"/../manifests/pgadmin-deployment.yaml
23+
kubectl --namespace default create -f "$ROOT"/../manifests/pgadmin-deployment.yaml
2424

2525
# Waiting for the pod to actually deploy correctly
26-
kubectl rollout status -f "$ROOT"/../manifests/pgadmin-deployment.yaml
26+
kubectl --namespace default rollout status -f "$ROOT"/../manifests/pgadmin-deployment.yaml

validate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fi
5353
# This method involves giving the 'get' command the same manifest used to
5454
# create the object. It will find an object matching
5555
# the description in the manifest
56-
if ! kubectl get -f "$ROOT"/manifests/pgadmin-deployment.yaml > /dev/null; then
56+
if ! kubectl --namespace default get -f "$ROOT"/manifests/pgadmin-deployment.yaml > /dev/null; then
5757
echo "FAIL: pgAdmin4 Deployment object does not exist"
5858
else
5959
echo "pgAdmin4 Deployment object exists"

0 commit comments

Comments
 (0)