From 9d78febb6f023d97a3d14f7cab2e85451d9ab016 Mon Sep 17 00:00:00 2001 From: Brian Sunter <2816289+briansunter@users.noreply.github.com> Date: Sun, 9 Jun 2024 09:27:10 -1000 Subject: [PATCH] kaniko --- manifests/nginx-deployment.yaml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/manifests/nginx-deployment.yaml b/manifests/nginx-deployment.yaml index 811e23c4..ac516d0f 100644 --- a/manifests/nginx-deployment.yaml +++ b/manifests/nginx-deployment.yaml @@ -1,30 +1,36 @@ -apiVersion: batch/v1 -kind: Job +apiVersion: apps/v1 +kind: Deployment metadata: - name: build-job-v3 + name: nginx-deployment spec: + replicas: 1 + selector: + matchLabels: + app: nginx template: + metadata: + labels: + app: nginx spec: containers: - - name: build - image: gcr.io/kaniko-project/executor:latest - args: - [ - "--dockerfile=Dockerfile", - "--context=git://github.com/briansunter/graph.git#refs/heads/kube", - "--destination=local-registry:5001/graph:latest", - "--insecure", - ] + - name: nginx + image: local-registry:5001/graph:latest volumeMounts: + - name: dist + mountPath: /usr/share/nginx/html - name: kaniko-secret mountPath: /kaniko/.docker securityContext: privileged: true restartPolicy: Never volumes: + - name: dist + emptyDir: {} - name: kaniko-secret secret: secretName: regcred items: - key: .dockerconfigjson path: config.json + imagePullSecrets: + - name: my-registry-secret