From 99b6acfccdebe287a95840d5a477820e2c2efc10 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 4 May 2021 14:05:04 -0400 Subject: [PATCH 01/46] restructure --- .travis.yml | 18 ++++++++++ docker/Dockerfile => Dockerfile | 4 +-- Makefile | 15 +++++++++ dai-deploy/hello-python-deploy.yaml | 27 +++++++++++++++ kubernetes/deployment.yaml | 52 +++++++++++++++++++++-------- 5 files changed, 101 insertions(+), 15 deletions(-) create mode 100644 .travis.yml rename docker/Dockerfile => Dockerfile (79%) create mode 100644 Makefile create mode 100644 dai-deploy/hello-python-deploy.yaml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..43b7a5b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: python + +python: +- "3.9" + +env: + - VERSION=10.0.1 + +services: + - docker + +before_install: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - curl -LO https://dist.xebialabs.com/public/xl-cli/$VERSION/linux-amd64/xl + - chmod +x xl + +script: + - make all \ No newline at end of file diff --git a/docker/Dockerfile b/Dockerfile similarity index 79% rename from docker/Dockerfile rename to Dockerfile index ce620c2..96ce93a 100644 --- a/docker/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM python:3.7 -RUN mkdir /app +#RUN mkdir /app WORKDIR /app -ADD . /app/ +ADD /app/ . RUN pip install -r requirements.txt EXPOSE 5000 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b0c8b3f --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +REPO ?= danberg/hello-py +TAG ?= $(shell git rev-parse --short HEAD) +IMAGE := $(REPO):$(TAG) +LATEST_IMAGE := $(REPO):latest + +all: docker-build docker-push timestamp + +docker-build: + docker build -t $(IMAGE) -f Dockerfile . + docker tag $(IMAGE) $(LATEST_IMAGE) +docker-push: + docker push $(IMAGE) + docker push $(LATEST_IMAGE) +timestamp: + date diff --git a/dai-deploy/hello-python-deploy.yaml b/dai-deploy/hello-python-deploy.yaml new file mode 100644 index 0000000..69f6a8e --- /dev/null +++ b/dai-deploy/hello-python-deploy.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: xl-deploy/v1 +kind: Applications +spec: +- name: Applications/HelloPy + type: udm.Application + children: + - name: 4b07c41 + type: udm.DeploymentPackage + deployables: + - name: hello-py-deploy.yaml + type: k8s.ResourcesFile + placeholders: + - image_tag + - ingress_host + fileEncodings: + ".+\\.properties": ISO-8859-1 + mergePatchType: strategic + propagationPolicy: Foreground + updateMethod: apply + createOrder: "60" + modifyOrder: "50" + destroyOrder: "40" + displayResourceOnLogs: "false" + showContainerLogs: "false" + bytesToReadFromContainerLogs: "4000" + file: !file "../kube/deployment.yml" \ No newline at end of file diff --git a/kubernetes/deployment.yaml b/kubernetes/deployment.yaml index fdaeb8e..26666e2 100644 --- a/kubernetes/deployment.yaml +++ b/kubernetes/deployment.yaml @@ -1,32 +1,58 @@ apiVersion: v1 kind: Service metadata: - name: hello-python-service + name: hello-py-svc spec: selector: - app: hello-python + app: hello-py ports: - protocol: "TCP" port: 6000 targetPort: 5000 - type: LoadBalancer - - + type: ClusterIP --- -apiVersion: apps/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - name: hello-python + labels: + app: hello-py + name: hello-py spec: - replicas: 4 + replicas: 3 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + selector: + matchLabels: + app: hello-py template: metadata: labels: - app: hello-python + app: hello-py spec: containers: - - name: hello-python - image: hello-python:latest - imagePullPolicy: Never + - image: danberg/hello-py:{{image_tag}} + name: hello-py ports: - - containerPort: 5000 + - containerPort: 5000 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: hello-py-ingress + annotations: + nginx.ingress.kubernetes.io/rewrite-target: /$2 +spec: + rules: + - host: "{{ingress_host}}" + http: + paths: + - path: /hellopy(/|$)(.*) + pathType: Prefix + backend: + service: + name: hello-py-svc + port: + number: 6000 From d120bb24e1faf6b7d0d16a1baa59958739c32d57 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 4 May 2021 14:30:47 -0400 Subject: [PATCH 02/46] change message --- app/main.py | 2 +- dai-deploy/hello-python-deploy.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index 5aff7f2..b64a8c1 100644 --- a/app/main.py +++ b/app/main.py @@ -3,7 +3,7 @@ @app.route("/") def hello(): - return "Hello from Python!" + return "Hello from Python - Dan!" if __name__ == "__main__": app.run(host='0.0.0.0') diff --git a/dai-deploy/hello-python-deploy.yaml b/dai-deploy/hello-python-deploy.yaml index 69f6a8e..ab0f9ec 100644 --- a/dai-deploy/hello-python-deploy.yaml +++ b/dai-deploy/hello-python-deploy.yaml @@ -5,7 +5,7 @@ spec: - name: Applications/HelloPy type: udm.Application children: - - name: 4b07c41 + - name: 99b6acf type: udm.DeploymentPackage deployables: - name: hello-py-deploy.yaml @@ -24,4 +24,4 @@ spec: displayResourceOnLogs: "false" showContainerLogs: "false" bytesToReadFromContainerLogs: "4000" - file: !file "../kube/deployment.yml" \ No newline at end of file + file: !file "../kubernetes/deployment.yaml" \ No newline at end of file From c9cdebe9f7bc37ad9887573127c0eff660d85827 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Fri, 7 May 2021 08:55:33 -0400 Subject: [PATCH 03/46] adjust image --- dai-deploy/hello-python-deploy.yaml | 2 +- kubernetes/deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dai-deploy/hello-python-deploy.yaml b/dai-deploy/hello-python-deploy.yaml index ab0f9ec..3365daa 100644 --- a/dai-deploy/hello-python-deploy.yaml +++ b/dai-deploy/hello-python-deploy.yaml @@ -5,7 +5,7 @@ spec: - name: Applications/HelloPy type: udm.Application children: - - name: 99b6acf + - name: d120bb2 type: udm.DeploymentPackage deployables: - name: hello-py-deploy.yaml diff --git a/kubernetes/deployment.yaml b/kubernetes/deployment.yaml index 26666e2..64aa13b 100644 --- a/kubernetes/deployment.yaml +++ b/kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: app: hello-py spec: containers: - - image: danberg/hello-py:{{image_tag}} + - image: {{image_name}}:{{image_tag}} name: hello-py ports: - containerPort: 5000 From 15e6f5373a7e4a5864a84f4d7cde318b39cebef3 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Fri, 7 May 2021 09:10:32 -0400 Subject: [PATCH 04/46] fix typo --- kubernetes/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/deployment.yaml b/kubernetes/deployment.yaml index 64aa13b..34a9cec 100644 --- a/kubernetes/deployment.yaml +++ b/kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: app: hello-py spec: containers: - - image: {{image_name}}:{{image_tag}} + - image: "{{image_name}}:{{image_tag}}" name: hello-py ports: - containerPort: 5000 From cabf0b5c61534f8b033d1437dc928d7c8fe0dbdb Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Fri, 14 May 2021 13:05:07 -0400 Subject: [PATCH 05/46] update message --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index b64a8c1..5aff7f2 100644 --- a/app/main.py +++ b/app/main.py @@ -3,7 +3,7 @@ @app.route("/") def hello(): - return "Hello from Python - Dan!" + return "Hello from Python!" if __name__ == "__main__": app.run(host='0.0.0.0') From b625249d112996f6dc89270590b1a5f5afdb76c1 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Fri, 14 May 2021 13:25:07 -0400 Subject: [PATCH 06/46] update message --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 5aff7f2..5cd81a0 100644 --- a/app/main.py +++ b/app/main.py @@ -3,7 +3,7 @@ @app.route("/") def hello(): - return "Hello from Python!" + return "Hello Everyone from Python!" if __name__ == "__main__": app.run(host='0.0.0.0') From 94de08936e1ecf70664f33de09996a1aeac874a2 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Fri, 14 May 2021 14:17:24 -0400 Subject: [PATCH 07/46] adjust message --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 5cd81a0..bd4a91e 100644 --- a/app/main.py +++ b/app/main.py @@ -3,7 +3,7 @@ @app.route("/") def hello(): - return "Hello Everyone from Python!" + return "Hello Friends from Python!" if __name__ == "__main__": app.run(host='0.0.0.0') From 4c115b0e25308feb3262f47a6f593ff82640d06e Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 17 May 2021 08:45:17 -0400 Subject: [PATCH 08/46] adjust message --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index bd4a91e..181301c 100644 --- a/app/main.py +++ b/app/main.py @@ -3,7 +3,7 @@ @app.route("/") def hello(): - return "Hello Friends from Python!" + return "Hello Dan from Python!" if __name__ == "__main__": app.run(host='0.0.0.0') From 402e85efd2f35dda973e5483bb79820c0074935a Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 17 May 2021 12:28:13 -0400 Subject: [PATCH 09/46] adjust text --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 181301c..5cd81a0 100644 --- a/app/main.py +++ b/app/main.py @@ -3,7 +3,7 @@ @app.route("/") def hello(): - return "Hello Dan from Python!" + return "Hello Everyone from Python!" if __name__ == "__main__": app.run(host='0.0.0.0') From a7f0201832e6822c6e75043bfa059b48a1b8b1b3 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 17 May 2021 12:29:27 -0400 Subject: [PATCH 10/46] adjust deployment --- kubernetes/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/deployment.yaml b/kubernetes/deployment.yaml index 34a9cec..b23c76b 100644 --- a/kubernetes/deployment.yaml +++ b/kubernetes/deployment.yaml @@ -33,7 +33,7 @@ spec: app: hello-py spec: containers: - - image: "{{image_name}}:{{image_tag}}" + - image: "danberg/hello-py:{{image_tag}}" name: hello-py ports: - containerPort: 5000 From 4b1071ddfd7859a5b2f6dcf5660bebf7f4c4f6f1 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 17 May 2021 12:43:10 -0400 Subject: [PATCH 11/46] Add friends to message --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 5cd81a0..bd4a91e 100644 --- a/app/main.py +++ b/app/main.py @@ -3,7 +3,7 @@ @app.route("/") def hello(): - return "Hello Everyone from Python!" + return "Hello Friends from Python!" if __name__ == "__main__": app.run(host='0.0.0.0') From b9cecbf6c0592eafa9fd6b94962ef8ab872e9d1f Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 10 Jan 2022 15:25:47 -0500 Subject: [PATCH 12/46] initial build_spec --- build_spec.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 build_spec.yaml diff --git a/build_spec.yaml b/build_spec.yaml new file mode 100644 index 0000000..9e19881 --- /dev/null +++ b/build_spec.yaml @@ -0,0 +1,39 @@ +version: 0.1 +component: build +timeoutInSeconds: 6000 +shell: bash + +# Variables +env: + variables: + "testEnv" : "testValue1" + # vaultVariables: + # docker_registry_password : + # exportedVariables: + # - patch_number + # - build_Result + +inputArtifacts: + +steps: + - type: Command + name: "Build Hello" + timeoutInSeconds: 4000 + shell: /bin/sh + - type: Command + timeoutInSeconds: 400 + name: "Docker Build" + command: | + make docker-build + onFailure: + - type: Command + command: | + echo "Handling Failure" + build_result=FAILURE + echo "Failure successfully handled" + timeoutInSeconds: 400 + +outputArtifacts: + - name: hello-py + type: DOCKER_IMAGE + location: docker-image \ No newline at end of file From ec42e895402a5a7ffed9cc69b7abed89c17552cb Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 10 Jan 2022 15:40:12 -0500 Subject: [PATCH 13/46] install make --- build_spec.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_spec.yaml b/build_spec.yaml index 9e19881..7f49048 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -20,6 +20,11 @@ steps: name: "Build Hello" timeoutInSeconds: 4000 shell: /bin/sh + - type: Command + name: "Install Make" + timeoutInSeconds: 4000 + command: | + apt-get -y install make - type: Command timeoutInSeconds: 400 name: "Docker Build" From 49f24f54450ea0ea82ae83350cd5fe030810e622 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 10 Jan 2022 15:58:27 -0500 Subject: [PATCH 14/46] remove invalid command --- build_spec.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index 7f49048..4c52802 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -16,10 +16,6 @@ env: inputArtifacts: steps: - - type: Command - name: "Build Hello" - timeoutInSeconds: 4000 - shell: /bin/sh - type: Command name: "Install Make" timeoutInSeconds: 4000 From ae7f8d975f2344258a42f988f99178833da60876 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 10 Jan 2022 16:12:52 -0500 Subject: [PATCH 15/46] Just docker build --- build_spec.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index 4c52802..90db244 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -16,11 +16,6 @@ env: inputArtifacts: steps: - - type: Command - name: "Install Make" - timeoutInSeconds: 4000 - command: | - apt-get -y install make - type: Command timeoutInSeconds: 400 name: "Docker Build" From 11e013373be12fb41a251ec3fe8389d8e97b5417 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 10 Jan 2022 17:41:36 -0500 Subject: [PATCH 16/46] move to use docker directly --- build_spec.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index 90db244..277fac6 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -6,12 +6,11 @@ shell: bash # Variables env: variables: - "testEnv" : "testValue1" + "IMAGE" : "danberg/hello-py" # vaultVariables: # docker_registry_password : - # exportedVariables: - # - patch_number - # - build_Result + exportedVariables: + - HelloImageTag inputArtifacts: @@ -20,7 +19,8 @@ steps: timeoutInSeconds: 400 name: "Docker Build" command: | - make docker-build + HelloImageTag=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-7` + docker build -t $(IMAGE) -f Dockerfile ${HelloImageTag} onFailure: - type: Command command: | @@ -32,4 +32,4 @@ steps: outputArtifacts: - name: hello-py type: DOCKER_IMAGE - location: docker-image \ No newline at end of file + location: ${IMAGE}.${HelloImageTag} \ No newline at end of file From e7da5c402572896e139883730aa657001b41297e Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 10 Jan 2022 17:44:25 -0500 Subject: [PATCH 17/46] fix variable use --- build_spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec.yaml b/build_spec.yaml index 277fac6..837b452 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -20,7 +20,7 @@ steps: name: "Docker Build" command: | HelloImageTag=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-7` - docker build -t $(IMAGE) -f Dockerfile ${HelloImageTag} + docker build -t ${IMAGE} -f Dockerfile ${HelloImageTag} onFailure: - type: Command command: | From fd184c553ba02b8fca6f1c5d7281ed1525269e12 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Mon, 10 Jan 2022 18:03:53 -0500 Subject: [PATCH 18/46] fix image tag --- build_spec.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index 837b452..ce833ec 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -20,14 +20,14 @@ steps: name: "Docker Build" command: | HelloImageTag=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-7` - docker build -t ${IMAGE} -f Dockerfile ${HelloImageTag} - onFailure: - - type: Command - command: | - echo "Handling Failure" - build_result=FAILURE - echo "Failure successfully handled" - timeoutInSeconds: 400 + docker build -t ${IMAGE}.${HelloImageTag} -f Dockerfile . + # onFailure: + # - type: Command + # command: | + # echo "Handling Failure" + # build_result=FAILURE + # echo "Failure successfully handled" + # timeoutInSeconds: 400 outputArtifacts: - name: hello-py From 5952076c6a19bc8e5d630b4886113990eaeef588 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 09:51:32 -0500 Subject: [PATCH 19/46] adjust image variables --- build_spec.yaml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index ce833ec..2378e69 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -6,7 +6,7 @@ shell: bash # Variables env: variables: - "IMAGE" : "danberg/hello-py" + "TAG_VERSION" : "latest" # vaultVariables: # docker_registry_password : exportedVariables: @@ -15,21 +15,29 @@ env: inputArtifacts: steps: + - type: Command + name: "Export image tag" + timeoutInSeconds: 40 + command: | + export TAG_VERSION=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-7` + - type: Command + name: "Echo TAG_VERSION" + command: | + echo "TAG_VERSION = " + $TAG_VERSION - type: Command timeoutInSeconds: 400 name: "Docker Build" command: | - HelloImageTag=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-7` - docker build -t ${IMAGE}.${HelloImageTag} -f Dockerfile . - # onFailure: - # - type: Command - # command: | - # echo "Handling Failure" - # build_result=FAILURE - # echo "Failure successfully handled" - # timeoutInSeconds: 400 + docker build -t danberg/hello-py -f Dockerfile . + onFailure: + - type: Command + command: | + echo "Handling image build failure" + build_result=FAILURE + echo "Failure successfully handled" + timeoutInSeconds: 400 outputArtifacts: - - name: hello-py + - name: hello-image type: DOCKER_IMAGE - location: ${IMAGE}.${HelloImageTag} \ No newline at end of file + location: danberg/hello-py \ No newline at end of file From 7d0177a8770e7247949846bf9ecb245b36224781 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 10:33:03 -0500 Subject: [PATCH 20/46] Push image --- build_spec.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index 2378e69..b8d45c4 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -7,8 +7,8 @@ shell: bash env: variables: "TAG_VERSION" : "latest" - # vaultVariables: - # docker_registry_password : + vaultVariables: + docker_registry_password : ocid1.vaultsecret.oc1.phx.amaaaaaayat6pyaacvggvlf6hmbgqguquempfl73xfo7fce5r4tiqh5ulgjq exportedVariables: - HelloImageTag @@ -23,12 +23,13 @@ steps: - type: Command name: "Echo TAG_VERSION" command: | - echo "TAG_VERSION = " + $TAG_VERSION + echo "TAG_VERSION = " $TAG_VERSION - type: Command timeoutInSeconds: 400 name: "Docker Build" command: | docker build -t danberg/hello-py -f Dockerfile . + docker tag danberg/hello-py:latest danberg/hello-py:$TAG_VERSION onFailure: - type: Command command: | @@ -36,6 +37,16 @@ steps: build_result=FAILURE echo "Failure successfully handled" timeoutInSeconds: 400 + - type: Command + timeoutInSeconds: 60 + name: "Log into Dockerhub" + command: | + docker login -u "danberg" -p ${docker_registry_password} + - type: Command + timeoutInSeconds: 400 + name: "Push image to Dockerhub" + command: | + docker push danberg/hello-py:$TAG_VERSION outputArtifacts: - name: hello-image From fdad7c0ce36559f490c209b426a226f55e71e6d3 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 10:47:23 -0500 Subject: [PATCH 21/46] fix image tag --- build_spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec.yaml b/build_spec.yaml index b8d45c4..85ac0ea 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -19,7 +19,7 @@ steps: name: "Export image tag" timeoutInSeconds: 40 command: | - export TAG_VERSION=`echo ${OCI_BUILD_RUN_ID} | rev | cut -c 1-7` + export TAG_VERSION=`echo ${OCI_BUILD_RUN_ID} | tail -c 8` - type: Command name: "Echo TAG_VERSION" command: | From 79b12fbb4a9142461413e8b98aabb15a66c85d07 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 10:55:01 -0500 Subject: [PATCH 22/46] Add commit tag --- build_spec.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build_spec.yaml b/build_spec.yaml index 85ac0ea..c679bf9 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -7,6 +7,7 @@ shell: bash env: variables: "TAG_VERSION" : "latest" + "COMMIT" : "0" vaultVariables: docker_registry_password : ocid1.vaultsecret.oc1.phx.amaaaaaayat6pyaacvggvlf6hmbgqguquempfl73xfo7fce5r4tiqh5ulgjq exportedVariables: @@ -21,9 +22,15 @@ steps: command: | export TAG_VERSION=`echo ${OCI_BUILD_RUN_ID} | tail -c 8` - type: Command - name: "Echo TAG_VERSION" + name: "Export commit tag" + timeoutInSeconds: 20 + command: | + export COMMIT?=`$(shell git rev-parse --short HEAD)` + - type: Command + name: "Echo Variables" command: | echo "TAG_VERSION = " $TAG_VERSION + echo "COMMIT = " $COMMIT - type: Command timeoutInSeconds: 400 name: "Docker Build" From 5c9022eda79a5d46dfd2983393c0c1b30fccc5c8 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 11:02:11 -0500 Subject: [PATCH 23/46] Add commit tag 2 --- build_spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec.yaml b/build_spec.yaml index c679bf9..92cceb4 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -25,7 +25,7 @@ steps: name: "Export commit tag" timeoutInSeconds: 20 command: | - export COMMIT?=`$(shell git rev-parse --short HEAD)` + export COMMIT=`$(shell git rev-parse --short HEAD)` - type: Command name: "Echo Variables" command: | From c75230611286ccc26dce2212a6fd63ff8ec4835c Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 11:18:31 -0500 Subject: [PATCH 24/46] export variables --- build_spec.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index 92cceb4..ad88425 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -5,13 +5,11 @@ shell: bash # Variables env: - variables: + exportedVariables: "TAG_VERSION" : "latest" "COMMIT" : "0" vaultVariables: docker_registry_password : ocid1.vaultsecret.oc1.phx.amaaaaaayat6pyaacvggvlf6hmbgqguquempfl73xfo7fce5r4tiqh5ulgjq - exportedVariables: - - HelloImageTag inputArtifacts: From c278d6d3951e8a2d64857ee73bcbba5d0ec009f7 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 11:32:31 -0500 Subject: [PATCH 25/46] export variables --- build_spec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index ad88425..0dee7ae 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -6,8 +6,8 @@ shell: bash # Variables env: exportedVariables: - "TAG_VERSION" : "latest" - "COMMIT" : "0" + - TAG_VERSION + - COMMIT vaultVariables: docker_registry_password : ocid1.vaultsecret.oc1.phx.amaaaaaayat6pyaacvggvlf6hmbgqguquempfl73xfo7fce5r4tiqh5ulgjq From 9f4455b295988ae111acdca711b020c3e5e17595 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 11:52:12 -0500 Subject: [PATCH 26/46] Set commit variable --- build_spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec.yaml b/build_spec.yaml index 0dee7ae..6b74418 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -23,7 +23,7 @@ steps: name: "Export commit tag" timeoutInSeconds: 20 command: | - export COMMIT=`$(shell git rev-parse --short HEAD)` + export COMMIT=`git rev-parse --short HEAD` - type: Command name: "Echo Variables" command: | From bf3a305f4c3e3675e3e745c9a543ff9c81fd9012 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 12:05:51 -0500 Subject: [PATCH 27/46] test trigger --- build_spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec.yaml b/build_spec.yaml index 6b74418..6c535fa 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -40,7 +40,7 @@ steps: command: | echo "Handling image build failure" build_result=FAILURE - echo "Failure successfully handled" + echo "Image build failure successfully handled" timeoutInSeconds: 400 - type: Command timeoutInSeconds: 60 From ab6419f9bad8fbe00ea79717be8e667820845d91 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 12:13:42 -0500 Subject: [PATCH 28/46] test trigger 2 --- build_spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec.yaml b/build_spec.yaml index 6c535fa..96ef7da 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -49,7 +49,7 @@ steps: docker login -u "danberg" -p ${docker_registry_password} - type: Command timeoutInSeconds: 400 - name: "Push image to Dockerhub" + name: "Push image to Dockerhub with proper tag" command: | docker push danberg/hello-py:$TAG_VERSION From 9bc22a26ba5a2ab0a61d65ed113431149e5a86a7 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 12:25:11 -0500 Subject: [PATCH 29/46] add mirror stage --- build_spec_mirror.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 build_spec_mirror.yaml diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml new file mode 100644 index 0000000..d834b9a --- /dev/null +++ b/build_spec_mirror.yaml @@ -0,0 +1,11 @@ +version: 0.1 +component: build +timeoutInSeconds: 6000 +shell: bash + +steps: + - type: Command + name: "Mirror remote repo" + timeoutInSeconds: 400 + command: | + oci devops repository mirror --repository-id ocid1.devopsrepository.oc1.phx.amaaaaaayat6pyaah6x6oynezgenfvpj4qwcb4fdpy2jzvjkmr6rizuoovrq \ No newline at end of file From 698558b09102be1f0d285c0ea88f0809d1a4d272 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 12:46:41 -0500 Subject: [PATCH 30/46] add oci version --- build_spec_mirror.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index d834b9a..a8a17e9 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -8,4 +8,5 @@ steps: name: "Mirror remote repo" timeoutInSeconds: 400 command: | + oci -v oci devops repository mirror --repository-id ocid1.devopsrepository.oc1.phx.amaaaaaayat6pyaah6x6oynezgenfvpj4qwcb4fdpy2jzvjkmr6rizuoovrq \ No newline at end of file From 3a6ecdce96c45438b53b760a4148823f4423c835 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 12:55:34 -0500 Subject: [PATCH 31/46] update oci cli --- build_spec_mirror.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index a8a17e9..569ea7f 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -4,6 +4,12 @@ timeoutInSeconds: 6000 shell: bash steps: + - type: Command + name: "Update OCI" + timeoutInSeconds: 400 + command: | + oci -v + yum update python36-oci-cli - type: Command name: "Mirror remote repo" timeoutInSeconds: 400 From 418a5d6246a13800a26f3d05fa91db22f3767da6 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 13:00:55 -0500 Subject: [PATCH 32/46] Install OCI cli --- build_spec_mirror.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index 569ea7f..2578a9a 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -9,7 +9,7 @@ steps: timeoutInSeconds: 400 command: | oci -v - yum update python36-oci-cli + yum install python36-oci-cli - type: Command name: "Mirror remote repo" timeoutInSeconds: 400 From d7ae8da5be0be7df5e0ab94844cff9dca5bb2fec Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 13:06:52 -0500 Subject: [PATCH 33/46] Install OCI cli 2 --- build_spec_mirror.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index 2578a9a..3454393 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -9,7 +9,7 @@ steps: timeoutInSeconds: 400 command: | oci -v - yum install python36-oci-cli + bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" --accept-all-defaults - type: Command name: "Mirror remote repo" timeoutInSeconds: 400 From a51a54ec3d03a5fc64d1cb7e9a904c98d554fbd0 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 13:10:55 -0500 Subject: [PATCH 34/46] Install OCI cli 3 --- build_spec_mirror.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index 3454393..c59526b 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -9,7 +9,7 @@ steps: timeoutInSeconds: 400 command: | oci -v - bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" --accept-all-defaults + bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh) --accept-all-defaults" - type: Command name: "Mirror remote repo" timeoutInSeconds: 400 From 29af4e53ed9200e00ffc35ab13a70230c4389764 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 13:34:00 -0500 Subject: [PATCH 35/46] Install OCI cli 4 --- build_spec_mirror.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index c59526b..fa02e2b 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -5,11 +5,16 @@ shell: bash steps: - type: Command - name: "Update OCI" + name: "Download OCI" timeoutInSeconds: 400 command: | oci -v - bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh) --accept-all-defaults" + curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh + - type: Command + name: "Update OCI CLI" + timeoutInSeconds: 400 + command: | + ./install.sh --accept-all-defaults - type: Command name: "Mirror remote repo" timeoutInSeconds: 400 From 3853c37966a17201a2914f03bb03fee4e3ee4c01 Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 13:52:24 -0500 Subject: [PATCH 36/46] Install OCI cli 5 --- build_spec_mirror.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index fa02e2b..3faee58 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -9,12 +9,13 @@ steps: timeoutInSeconds: 400 command: | oci -v - curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh + curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh --output install_oci.sh - type: Command name: "Update OCI CLI" timeoutInSeconds: 400 command: | - ./install.sh --accept-all-defaults + chmod +x ${OCI_WORKSPACE_DIR}/install_oci.sh + ${OCI_WORKSPACE_DIR}/install_oci.sh --accept-all-defaults true - type: Command name: "Mirror remote repo" timeoutInSeconds: 400 From b91539954acf9ee95dc3efc10a04d4e27391f6db Mon Sep 17 00:00:00 2001 From: Daniel Berg Date: Tue, 11 Jan 2022 13:56:13 -0500 Subject: [PATCH 37/46] Install OCI cli 6 --- build_spec_mirror.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index 3faee58..d5416cd 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -9,7 +9,7 @@ steps: timeoutInSeconds: 400 command: | oci -v - curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh --output install_oci.sh + curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh --output ${OCI_WORKSPACE_DIR}/install_oci.sh - type: Command name: "Update OCI CLI" timeoutInSeconds: 400 From 8b3e48b5f466213851eb822eb98102d4bfff56dc Mon Sep 17 00:00:00 2001 From: Dan Berg Date: Tue, 11 Jan 2022 14:52:01 -0500 Subject: [PATCH 38/46] Install OCI cli 7 --- build_spec_mirror.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index d5416cd..9ca6c72 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -15,7 +15,7 @@ steps: timeoutInSeconds: 400 command: | chmod +x ${OCI_WORKSPACE_DIR}/install_oci.sh - ${OCI_WORKSPACE_DIR}/install_oci.sh --accept-all-defaults true + ${OCI_WORKSPACE_DIR}/install_oci.sh --accept-all-defaults - type: Command name: "Mirror remote repo" timeoutInSeconds: 400 From 2cb519e38f2c525ee26dc11a66f3bd6807bb9383 Mon Sep 17 00:00:00 2001 From: Dan Berg Date: Tue, 11 Jan 2022 15:03:36 -0500 Subject: [PATCH 39/46] Remove existing install dir --- build_spec_mirror.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_spec_mirror.yaml b/build_spec_mirror.yaml index 9ca6c72..9d1e099 100644 --- a/build_spec_mirror.yaml +++ b/build_spec_mirror.yaml @@ -10,6 +10,11 @@ steps: command: | oci -v curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh --output ${OCI_WORKSPACE_DIR}/install_oci.sh + - type: Command + name: "Remove existing OCI install dir" + timeoutInSeconds: 60 + command: | + rm -r /root/lib/oracle-cli - type: Command name: "Update OCI CLI" timeoutInSeconds: 400 From fc0bb7b2d072be6f194442b039efb32463de6e8a Mon Sep 17 00:00:00 2001 From: Dan Berg Date: Tue, 11 Jan 2022 15:39:34 -0500 Subject: [PATCH 40/46] Capture kube manifest in output --- build_spec.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build_spec.yaml b/build_spec.yaml index 96ef7da..7f39cca 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -52,8 +52,16 @@ steps: name: "Push image to Dockerhub with proper tag" command: | docker push danberg/hello-py:$TAG_VERSION + - type: Command + timeoutInSeconds: 40 + name: "Copy Kubernetes manifest" + command: | + cp /kubernetes/deployment_oke.yaml deployment/deployment_oke.yaml outputArtifacts: + - name: deployment-manifest + type: BINARY + location: deployment/deployment_oke.yaml - name: hello-image type: DOCKER_IMAGE location: danberg/hello-py \ No newline at end of file From 86f035ea88d11ce131da5063e89c4a9d24fbc341 Mon Sep 17 00:00:00 2001 From: Dan Berg Date: Tue, 11 Jan 2022 19:01:03 -0500 Subject: [PATCH 41/46] add kube deployment for OKE --- kubernetes/deployment_oke.yaml | 61 ++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 kubernetes/deployment_oke.yaml diff --git a/kubernetes/deployment_oke.yaml b/kubernetes/deployment_oke.yaml new file mode 100644 index 0000000..518561d --- /dev/null +++ b/kubernetes/deployment_oke.yaml @@ -0,0 +1,61 @@ +apiVersion: v1 +kind: Service +metadata: + name: hello-py-svc + namespace: ${namespace} +spec: + selector: + app: hello-py + ports: + - protocol: "TCP" + port: 6000 + targetPort: 5000 + type: ClusterIP +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: hello-py + name: hello-py + namespace: ${namespace} +spec: + replicas: 3 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + selector: + matchLabels: + app: hello-py + template: + metadata: + labels: + app: hello-py + spec: + containers: + - image: "danberg/hello-py:${image_tag}" + name: hello-py + ports: + - containerPort: 5000 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: hello-py-ingress + namespace: ${namespace} + annotations: + nginx.ingress.kubernetes.io/rewrite-target: /$2 +spec: + rules: + - host: "${ingress_host}" + http: + paths: + - path: /hellopy(/|$)(.*) + pathType: Prefix + backend: + service: + name: hello-py-svc + port: + number: 6000 From c8044256bbd4297ea393f517af2e0902e5d790ed Mon Sep 17 00:00:00 2001 From: Dan Berg Date: Wed, 12 Jan 2022 09:12:18 -0500 Subject: [PATCH 42/46] adjust kube manifest location --- build_spec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_spec.yaml b/build_spec.yaml index 7f39cca..cb7e757 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -56,7 +56,7 @@ steps: timeoutInSeconds: 40 name: "Copy Kubernetes manifest" command: | - cp /kubernetes/deployment_oke.yaml deployment/deployment_oke.yaml + cp ${OCI_PRIMARY_SOURCE_DIR}/kubernetes/deployment_oke.yaml deployment/deployment_oke.yaml outputArtifacts: - name: deployment-manifest From d5089d1e662b636fbb7ffb360f2bddb29b8e95e1 Mon Sep 17 00:00:00 2001 From: Dan Berg Date: Wed, 12 Jan 2022 09:16:18 -0500 Subject: [PATCH 43/46] remove kube manifest cp --- build_spec.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index cb7e757..344bc66 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -52,16 +52,11 @@ steps: name: "Push image to Dockerhub with proper tag" command: | docker push danberg/hello-py:$TAG_VERSION - - type: Command - timeoutInSeconds: 40 - name: "Copy Kubernetes manifest" - command: | - cp ${OCI_PRIMARY_SOURCE_DIR}/kubernetes/deployment_oke.yaml deployment/deployment_oke.yaml outputArtifacts: - name: deployment-manifest type: BINARY - location: deployment/deployment_oke.yaml + location: ${OCI_PRIMARY_SOURCE_DIR}/kubernetes/deployment_oke.yaml - name: hello-image type: DOCKER_IMAGE location: danberg/hello-py \ No newline at end of file From 93c545bdc2619b4a9c857e04abc80e7799b97156 Mon Sep 17 00:00:00 2001 From: Dan Berg Date: Wed, 12 Jan 2022 14:52:59 -0500 Subject: [PATCH 44/46] adjust image tag paramter --- kubernetes/deployment_oke.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/deployment_oke.yaml b/kubernetes/deployment_oke.yaml index 518561d..e274092 100644 --- a/kubernetes/deployment_oke.yaml +++ b/kubernetes/deployment_oke.yaml @@ -35,7 +35,7 @@ spec: app: hello-py spec: containers: - - image: "danberg/hello-py:${image_tag}" + - image: "danberg/hello-py:${TAG_VERSION}" name: hello-py ports: - containerPort: 5000 From 7bc48c06991b63314eee39c709542e618438c4d2 Mon Sep 17 00:00:00 2001 From: Dan Berg Date: Wed, 12 Jan 2022 17:24:24 -0500 Subject: [PATCH 45/46] adjust timeouts --- build_spec.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_spec.yaml b/build_spec.yaml index 344bc66..a19f85f 100644 --- a/build_spec.yaml +++ b/build_spec.yaml @@ -16,12 +16,12 @@ inputArtifacts: steps: - type: Command name: "Export image tag" - timeoutInSeconds: 40 + timeoutInSeconds: 400 command: | export TAG_VERSION=`echo ${OCI_BUILD_RUN_ID} | tail -c 8` - type: Command name: "Export commit tag" - timeoutInSeconds: 20 + timeoutInSeconds: 200 command: | export COMMIT=`git rev-parse --short HEAD` - type: Command @@ -43,7 +43,7 @@ steps: echo "Image build failure successfully handled" timeoutInSeconds: 400 - type: Command - timeoutInSeconds: 60 + timeoutInSeconds: 600 name: "Log into Dockerhub" command: | docker login -u "danberg" -p ${docker_registry_password} From ccf7fd9be82dabf72799e49409b02b15d676b76c Mon Sep 17 00:00:00 2001 From: Dan Berg Date: Wed, 12 Jan 2022 18:15:12 -0500 Subject: [PATCH 46/46] Remove namespace --- kubernetes/deployment_oke.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/kubernetes/deployment_oke.yaml b/kubernetes/deployment_oke.yaml index e274092..d074667 100644 --- a/kubernetes/deployment_oke.yaml +++ b/kubernetes/deployment_oke.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: Service metadata: name: hello-py-svc - namespace: ${namespace} spec: selector: app: hello-py @@ -18,7 +17,6 @@ metadata: labels: app: hello-py name: hello-py - namespace: ${namespace} spec: replicas: 3 strategy: @@ -44,7 +42,6 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: hello-py-ingress - namespace: ${namespace} annotations: nginx.ingress.kubernetes.io/rewrite-target: /$2 spec: