Skip to content

Commit

Permalink
chore: dev workspace fixes (various)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilHanlon committed Jul 27, 2024
1 parent c9c450f commit 898212c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 7 deletions.
18 changes: 18 additions & 0 deletions hack/k3s/pod.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 12 additions & 0 deletions hack/k3s/pvc.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions hack/k8s_dev_pf
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions hack/setup_dev_temporal
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions hack/setup_external_dev_services
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)."
Expand Down

0 comments on commit 898212c

Please sign in to comment.