diff --git a/hack/k3s/pod.yaml b/hack/k3s/pod.yaml new file mode 100644 index 00000000..2ca8ca9b --- /dev/null +++ b/hack/k3s/pod.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Pod +metadata: + name: volume-test +spec: + containers: + - name: volume-test + image: nginx:stable-alpine + imagePullPolicy: IfNotPresent + volumeMounts: + - name: volv + mountPath: /data + ports: + - containerPort: 80 + volumes: + - name: volv + persistentVolumeClaim: + claimName: local-path-pvc diff --git a/hack/k3s/pvc.yaml b/hack/k3s/pvc.yaml new file mode 100644 index 00000000..6a2cb67b --- /dev/null +++ b/hack/k3s/pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: local-path-pvc + namespace: default +spec: + accessModes: + - ReadWriteOnce + storageClassName: local-path + resources: + requests: + storage: 10Gi diff --git a/hack/k8s_dev_pf b/hack/k8s_dev_pf index 6c7ef8a6..4cc1a246 100755 --- a/hack/k8s_dev_pf +++ b/hack/k8s_dev_pf @@ -35,6 +35,6 @@ trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT USER="$(whoami)" -kubectl -n "$USER-dev" port-forward svc/spicedb-dev-grpc-dev-service 50051 & -kubectl -n "$USER-dev" port-forward svc/hydra-admin-dev-http-dev-service 4445 & -kubectl -n "$USER-dev" port-forward svc/hydra-public-dev-http-dev-service 4444 +kubectl -n "$USER-dev" port-forward svc/spicedb-grpc-dev-service 50051 & +kubectl -n "$USER-dev" port-forward svc/hydra-admin-http-dev-service 4445 & +kubectl -n "$USER-dev" port-forward svc/hydra-public-http-dev-service 4444 diff --git a/hack/setup_dev_temporal b/hack/setup_dev_temporal index 864465e6..a9de4a1c 100755 --- a/hack/setup_dev_temporal +++ b/hack/setup_dev_temporal @@ -49,11 +49,11 @@ export SQL_PORT=$POSTGRES_PORT export SQL_USER=postgres export SQL_PASSWORD=postgres -./temporal-sql-tool create-database -database temporal +./temporal-sql-tool create-database temporal SQL_DATABASE=temporal ./temporal-sql-tool setup-schema -v 0.0 SQL_DATABASE=temporal ./temporal-sql-tool update -schema-dir schema/postgresql/v96/temporal/versioned -./temporal-sql-tool create-database -database temporal_visibility +./temporal-sql-tool create-database temporal_visibility SQL_DATABASE=temporal_visibility ./temporal-sql-tool setup-schema -v 0.0 SQL_DATABASE=temporal_visibility ./temporal-sql-tool update -schema-dir schema/postgresql/v96/visibility/versioned diff --git a/hack/setup_external_dev_services b/hack/setup_external_dev_services index 828bdb5c..3a8a820e 100755 --- a/hack/setup_external_dev_services +++ b/hack/setup_external_dev_services @@ -33,6 +33,7 @@ # TODO: Setup an bash error trap, to make errors from failing commands more # visible and draw attention of the user to these errors. +source .envrc.local # Install postgres helm repo add bitnami https://charts.bitnami.com/bitnami @@ -45,8 +46,7 @@ helm repo add bitnami https://charts.bitnami.com/bitnami # and places a PersisentVolumeClaim for this. # Ensure that the cluster provides PersistentVolumes: -if kubectl get PersistentVolume -o json - | jq -e '.items | .[].status | select(.phase == "Bound")' ; then +if kubectl get PersistentVolume -o json | jq -e '.items | .[].status | select(.phase == "Bound")' ; then echo "Ok found at least one PersistentVolume" else echo "The postgresql helm chart has a PersistentVolumeClaim (PVC)."