From 49e403b6a2d39b7ada55c49d2d038c9d6984007e Mon Sep 17 00:00:00 2001 From: Salah Al Saleh Date: Fri, 29 Dec 2023 16:00:12 +0000 Subject: [PATCH] More dev env improvements --- kustomize/base/service.yaml | 2 ++ kustomize/overlays/kotsstore/deployment.yaml | 2 +- .../overlays/kotsstore/minio/secret.yaml | 7 +++-- .../overlays/kotsstore/minio/service.yaml | 10 +++---- .../overlays/kotsstore/minio/statefulset.yaml | 29 ++++++++----------- migrations/kustomize/overlays/dev/rqlite.yaml | 12 ++++++++ skaffold.yaml | 9 ------ 7 files changed, 36 insertions(+), 35 deletions(-) diff --git a/kustomize/base/service.yaml b/kustomize/base/service.yaml index a313f7d2b8..af0797effd 100644 --- a/kustomize/base/service.yaml +++ b/kustomize/base/service.yaml @@ -3,6 +3,8 @@ kind: Service metadata: name: kotsadm labels: + kots.io/kotsadm: 'true' + kots.io/backup: velero app: kotsadm annotations: dev.okteto.com/auto-ingress: "true" diff --git a/kustomize/overlays/kotsstore/deployment.yaml b/kustomize/overlays/kotsstore/deployment.yaml index 74b3eeb3c7..1c1aab3f2a 100644 --- a/kustomize/overlays/kotsstore/deployment.yaml +++ b/kustomize/overlays/kotsstore/deployment.yaml @@ -16,7 +16,7 @@ spec: - name: S3_BUCKET_NAME value: "shipbucket" - name: S3_ENDPOINT - value: http://kotsadm-s3:4569/ + value: http://kotsadm-minio:4569/ - name: S3_ACCESS_KEY_ID value: not-a-key - name: S3_SECRET_ACCESS_KEY diff --git a/kustomize/overlays/kotsstore/minio/secret.yaml b/kustomize/overlays/kotsstore/minio/secret.yaml index b34a6cd499..46b9b4f666 100644 --- a/kustomize/overlays/kotsstore/minio/secret.yaml +++ b/kustomize/overlays/kotsstore/minio/secret.yaml @@ -5,7 +5,8 @@ data: kind: Secret metadata: labels: - app: minio - release: minio - name: minio + kots.io/kotsadm: 'true' + kots.io/backup: velero + app: kotsadm-minio + name: kotsadm-minio type: Opaque diff --git a/kustomize/overlays/kotsstore/minio/service.yaml b/kustomize/overlays/kotsstore/minio/service.yaml index 3052f0aa5b..33db23cac4 100644 --- a/kustomize/overlays/kotsstore/minio/service.yaml +++ b/kustomize/overlays/kotsstore/minio/service.yaml @@ -2,9 +2,10 @@ apiVersion: v1 kind: Service metadata: labels: - app: minio - release: minio - name: kotsadm-s3 + kots.io/kotsadm: 'true' + kots.io/backup: velero + app: kotsadm-minio + name: kotsadm-minio spec: ports: - name: service @@ -12,6 +13,5 @@ spec: protocol: TCP targetPort: 9000 selector: - app: minio - release: minio + app: kotsadm-minio type: ClusterIP diff --git a/kustomize/overlays/kotsstore/minio/statefulset.yaml b/kustomize/overlays/kotsstore/minio/statefulset.yaml index a988e4f1d5..298ec522de 100644 --- a/kustomize/overlays/kotsstore/minio/statefulset.yaml +++ b/kustomize/overlays/kotsstore/minio/statefulset.yaml @@ -1,27 +1,22 @@ apiVersion: apps/v1 kind: StatefulSet metadata: + name: kotsadm-minio labels: - app: minio - release: minio - kots.io/backup-type: admin-console - name: minio + kots.io/kotsadm: 'true' + kots.io/backup: velero spec: - serviceName: minio + serviceName: kotsadm-minio selector: matchLabels: - app: minio - release: minio + app: kotsadm-minio template: metadata: labels: - app: minio - release: minio - kots.io/backup-type: admin-console - annotations: - backup.velero.io/backup-volumes: miniodata - kots.io/backup-type: admin-console - name: minio + kots.io/kotsadm: 'true' + kots.io/backup: velero + app: kotsadm-minio + name: kotsadm-minio spec: securityContext: runAsUser: 1001 @@ -35,12 +30,12 @@ spec: valueFrom: secretKeyRef: key: accesskey - name: minio + name: kotsadm-minio - name: MINIO_SECRET_KEY valueFrom: secretKeyRef: key: secretkey - name: minio + name: kotsadm-minio - name: MINIO_BROWSER value: "on" image: kotsadm/minio:0.20231101.183725 @@ -55,7 +50,7 @@ spec: periodSeconds: 30 successThreshold: 1 timeoutSeconds: 1 - name: minio + name: kotsadm-minio ports: - containerPort: 9000 name: service diff --git a/migrations/kustomize/overlays/dev/rqlite.yaml b/migrations/kustomize/overlays/dev/rqlite.yaml index c5a64d8404..563b64102c 100644 --- a/migrations/kustomize/overlays/dev/rqlite.yaml +++ b/migrations/kustomize/overlays/dev/rqlite.yaml @@ -4,6 +4,8 @@ kind: Service metadata: name: kotsadm-rqlite labels: + kots.io/kotsadm: 'true' + kots.io/backup: velero app: kotsadm-rqlite spec: type: ClusterIP @@ -18,6 +20,9 @@ apiVersion: v1 kind: Service metadata: name: kotsadm-rqlite-headless + labels: + kots.io/kotsadm: 'true' + kots.io/backup: velero spec: type: ClusterIP clusterIP: None @@ -34,6 +39,8 @@ kind: Secret metadata: name: kotsadm-rqlite labels: + kots.io/kotsadm: 'true' + kots.io/backup: velero app: kotsadm-rqlite type: Opaque data: @@ -45,6 +52,9 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: kotsadm-rqlite + labels: + kots.io/kotsadm: 'true' + kots.io/backup: velero spec: replicas: 1 serviceName: kotsadm-rqlite-headless @@ -55,6 +65,8 @@ spec: template: metadata: labels: + kots.io/kotsadm: 'true' + kots.io/backup: velero app: kotsadm-rqlite spec: containers: diff --git a/skaffold.yaml b/skaffold.yaml index 51e8c6e1b9..ebe19fbc9c 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -40,15 +40,6 @@ manifests: deploy: kubectl: {} statusCheckDeadlineSeconds: 240 -portForward: - - resourceType: service - resourceName: kotsadm - port: 3000 - localPort: 30000 - - resourceType: service - resourceName: kurl-proxy - port: 8800 - localPort: 30880 profiles: - name: kotsstore activation: