diff --git a/Makefile b/Makefile index 9078928..61d7f37 100644 --- a/Makefile +++ b/Makefile @@ -11,11 +11,7 @@ secrets: flux: ./scripts/flux-bootstrap.sh -dev: kind namespaces secrets velero chisel - -prod: echoenv namespaces secrets velero chisel flux - -staging: echoenv namespaces secrets velero chisel flux +cluster: echoenv kind namespaces secrets velero chisel flux echoenv: echo "[echoenv] Using ${ENV} environment. If this is not what you want, export ENV=development|staging|production" diff --git a/charts/fp/Chart.yaml b/charts/fp/Chart.yaml index 772518b..a0e3e76 100644 --- a/charts/fp/Chart.yaml +++ b/charts/fp/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: fp description: The Galaxy's Best VTuber Hentai Site -version: 0.0.9 +version: 0.0.10 keywords: - fp - futureporn diff --git a/charts/fp/templates/traefik.yaml b/charts/fp/templates/traefik.yaml deleted file mode 100644 index cf5fc5d..0000000 --- a/charts/fp/templates/traefik.yaml +++ /dev/null @@ -1,46 +0,0 @@ - ---- -apiVersion: v1 -kind: Service -metadata: - name: traefik - namespace: futureporn - annotations: - {{ if eq .Values.environment "development" }} - chisel-operator.io/exit-node-name: "traefik-exit-node" - {{ end }} - meta.helm.sh/release-name: fp - meta.helm.sh/release-namespace: futureporn - labels: - app.kubernetes.io/managed-by: Helm -spec: - ports: - - name: web - port: 80 - targetPort: web - protocol: TCP - - name: websecure - port: 443 - protocol: TCP - selector: - app.kubernetes.io/name: traefik - app.kubernetes.io/instance: traefik-futureporn - type: LoadBalancer - - - -{{ if eq .Values.environment "development" }} ---- -apiVersion: chisel-operator.io/v1 -kind: ExitNode -metadata: - name: traefik-exit-node - namespace: futureporn -spec: - host: "{{ .Values.chisel.exitNodeIp }}" - port: 9090 - auth: chisel - -{{ end }} - - diff --git a/scripts/flux-bootstrap.sh b/scripts/flux-bootstrap.sh index 6086107..caae54d 100755 --- a/scripts/flux-bootstrap.sh +++ b/scripts/flux-bootstrap.sh @@ -4,6 +4,11 @@ if [ -z "${ENV}" ]; then \ echo "Error: ENV variable is not defined. Please set to one of development|staging|production"; exit 1; \ fi +if [ "${ENV}" == "development" ]; then \ + echo "Flux is not used in development environment. Skipping." + exit 0 +fi + # flux bootstrap git \ # --kubeconfig /home/cj/.kube/vke.yaml \ # --url=https://gitea.futureporn.net/futureporn/fp.git \ diff --git a/scripts/kind-with-local-registry.sh b/scripts/kind-with-local-registry.sh index 8862481..ff3911c 100755 --- a/scripts/kind-with-local-registry.sh +++ b/scripts/kind-with-local-registry.sh @@ -1,6 +1,16 @@ #!/bin/sh set -o errexit +if [ -z "${ENV}" ]; then \ + echo "Error: ENV variable is not defined. Please set to one of development|staging|production"; exit 1; \ +fi + +if [ "${ENV}" != "development" ]; then \ + echo "kind is only for development environment. Skipping." + exit 0 +fi + + # 1. Create registry container unless it already exists reg_name='kind-registry' reg_port='5001'