Skip to content

Commit

Permalink
Various fixes related to hive developer experience (dx)
Browse files Browse the repository at this point in the history
.gitignore: add venv so I stop accidentally adding it with `git add hack/`

hack/*.sh: use `oc` instead of `kubectl`

Makefile: add target for using podman to push to registry (local
registry running in podman has no security setup, hence ignore TLS)
  • Loading branch information
dlom committed Nov 8, 2024
1 parent 00f84cc commit e8d00f1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
bin/**
**/__debug_bin
**/__pycache__
**/venv

# Test binary, build with `go test -c`
*.test
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ buildah-dev-build:
podman-dev-build:
podman build --tag ${IMG} $(GOCACHE_VOL_ARG) -f ./Dockerfile .

.PHONY: podman-dev-push
podman-dev-push: podman-dev-build
podman push --tls-verify=false ${IMG}

# Build and push the dev image with buildah
.PHONY: buildah-dev-push
buildah-dev-push: buildah-dev-build
Expand Down
2 changes: 1 addition & 1 deletion hack/create-service-account-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# - hiveadmission
# - hive-controllers
#
cat <<EOF | kubectl apply -f -
cat <<EOF | oc apply -f -
apiVersion: v1
kind: List
items:
Expand Down
8 changes: 4 additions & 4 deletions hack/hiveadmission-dev-cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cat <<EOF | cfssl genkey - | cfssljson -bare server
}
EOF

cat <<EOF | kubectl apply -f -
cat <<EOF | oc apply -f -
apiVersion: certificates.k8s.io/v1
kind: CertificateSigningRequest
metadata:
Expand All @@ -38,14 +38,14 @@ spec:
- server auth
EOF

kubectl certificate approve hiveadmission.${HIVE_NS}
oc adm certificate approve hiveadmission.${HIVE_NS}

sleep 5
kubectl get csr hiveadmission.${HIVE_NS} -o jsonpath='{.status.certificate}' | base64 --decode > server.crt
oc get csr hiveadmission.${HIVE_NS} -o jsonpath='{.status.certificate}' | base64 --decode > server.crt

cat server.crt

cat <<EOF | kubectl apply -f -
cat <<EOF | oc apply -f -
kind: Secret
apiVersion: v1
data:
Expand Down

0 comments on commit e8d00f1

Please # to comment.