diff --git a/kube/base/service.yaml b/kube/base/service.yaml index 7cb2a13..55aea8f 100644 --- a/kube/base/service.yaml +++ b/kube/base/service.yaml @@ -10,3 +10,4 @@ spec: - name: http protocol: TCP port: 8080 + targetPort: 8080 diff --git a/kube/overlays/dev/kustomization.yaml b/kube/overlays/dev/kustomization.yaml index 721e240..0cdb48e 100644 --- a/kube/overlays/dev/kustomization.yaml +++ b/kube/overlays/dev/kustomization.yaml @@ -1,6 +1,3 @@ -# To update the build number at deployment time use: -# export BUILD_NUMBER="v1.x.x" -# yq eval -i ".images[0].newTag = $BUILD_NUMBER" overlays/dev/kustomization.yaml --- apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization @@ -8,19 +5,17 @@ bases: - ../../base namespace: dev - -# namePrefix: dev- commonLabels: env: dev -resources: - - namespace.yaml +# resources: +# - namespace.yaml patches: - - replica-count.yaml - - node-port.yaml + - patch-deploy.yaml + - patch-svc.yaml images: - name: hitcounter newName: us.icr.io/nyu_devops/lab-kubernetes - newTag: "2.1" + newTag: "21" diff --git a/kube/overlays/dev/patch-deploy.yaml b/kube/overlays/dev/patch-deploy.yaml index 4ba2378..049988e 100644 --- a/kube/overlays/dev/patch-deploy.yaml +++ b/kube/overlays/dev/patch-deploy.yaml @@ -4,3 +4,7 @@ metadata: name: hitcounter spec: replicas: 1 + template: + spec: + imagePullSecrets: + - name: all-icr-io diff --git a/kube/overlays/dev/patch-svc.yaml b/kube/overlays/dev/patch-svc.yaml index 613a693..04f1d0a 100644 --- a/kube/overlays/dev/patch-svc.yaml +++ b/kube/overlays/dev/patch-svc.yaml @@ -3,6 +3,8 @@ kind: Service metadata: name: hitcounter spec: + type: NodePort + internalTrafficPolicy: Local ports: - name: http protocol: TCP diff --git a/kube/overlays/prod/kustomization.yaml b/kube/overlays/prod/kustomization.yaml index 5cc8437..05dd105 100644 --- a/kube/overlays/prod/kustomization.yaml +++ b/kube/overlays/prod/kustomization.yaml @@ -4,19 +4,17 @@ bases: - ../../base namespace: prod - -# namePrefix: prod- commonLabels: env: prod -resources: - - namespace.yaml +# resources: +# - namespace.yaml patches: - - replica-count.yaml - - node-port.yaml + - patch-deploy.yaml + - patch-svc.yaml images: - name: hitcounter newName: us.icr.io/nyu_devops/lab-kubernetes - newTag: "2.1" + newTag: "21" diff --git a/kube/overlays/prod/patch-deploy.yaml b/kube/overlays/prod/patch-deploy.yaml index 5954573..8977192 100644 --- a/kube/overlays/prod/patch-deploy.yaml +++ b/kube/overlays/prod/patch-deploy.yaml @@ -4,3 +4,7 @@ metadata: name: hitcounter spec: replicas: 2 + template: + spec: + imagePullSecrets: + - name: all-icr-io diff --git a/kube/overlays/prod/patch-svc.yaml b/kube/overlays/prod/patch-svc.yaml index cdef02e..fcbec93 100644 --- a/kube/overlays/prod/patch-svc.yaml +++ b/kube/overlays/prod/patch-svc.yaml @@ -3,6 +3,8 @@ kind: Service metadata: name: hitcounter spec: + type: NodePort + internalTrafficPolicy: Local ports: - name: http protocol: TCP