chore: dev workspace fixes (various)

This commit is contained in:
Neil Hanlon 2024-03-11 15:21:45 -04:00
parent bfeabc6dbf
commit ec3e03c56d
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
5 changed files with 37 additions and 7 deletions

18
hack/k3s/pod.yaml Normal file
View File

@ -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

12
hack/k3s/pvc.yaml Normal file
View File

@ -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

View File

@ -35,6 +35,6 @@
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
USER="$(whoami)" USER="$(whoami)"
kubectl -n "$USER-dev" port-forward svc/spicedb-dev-grpc-dev-service 50051 & kubectl -n "$USER-dev" port-forward svc/spicedb-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-admin-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/hydra-public-http-dev-service 4444

View File

@ -49,11 +49,11 @@ export SQL_PORT=$POSTGRES_PORT
export SQL_USER=postgres export SQL_USER=postgres
export SQL_PASSWORD=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 setup-schema -v 0.0
SQL_DATABASE=temporal ./temporal-sql-tool update -schema-dir schema/postgresql/v96/temporal/versioned 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 setup-schema -v 0.0
SQL_DATABASE=temporal_visibility ./temporal-sql-tool update -schema-dir schema/postgresql/v96/visibility/versioned SQL_DATABASE=temporal_visibility ./temporal-sql-tool update -schema-dir schema/postgresql/v96/visibility/versioned

View File

@ -33,6 +33,7 @@
# TODO: Setup an bash error trap, to make errors from failing commands more # TODO: Setup an bash error trap, to make errors from failing commands more
# visible and draw attention of the user to these errors. # visible and draw attention of the user to these errors.
source .envrc.local
# Install postgres # Install postgres
helm repo add bitnami https://charts.bitnami.com/bitnami 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. # and places a PersisentVolumeClaim for this.
# Ensure that the cluster provides PersistentVolumes: # Ensure that the cluster provides PersistentVolumes:
if kubectl get PersistentVolume -o json if kubectl get PersistentVolume -o json | jq -e '.items | .[].status | select(.phase == "Bound")' ; then
| jq -e '.items | .[].status | select(.phase == "Bound")' ; then
echo "Ok found at least one PersistentVolume" echo "Ok found at least one PersistentVolume"
else else
echo "The postgresql helm chart has a PersistentVolumeClaim (PVC)." echo "The postgresql helm chart has a PersistentVolumeClaim (PVC)."