Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

HIVE-2656: Various fixes related to hive developer experience (dx) #2512

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't hate this, but it assumes everyone uses the same name for their python venv as you.

You can set up personal gitignores in several ways. For example, my ~/.gitconfig contains:

[core]
	excludesfile = /home/efried/.gitignore

...and that file contains:

.vscode/
*.orig
.sw[a-p]
.*.sw[a-p]

(The idea being that not everyone necessarily uses vscode -- though I see we've got that in here on L33 -- or vim.)


# 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}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely +1 to having this target.

I don't think we should turn off TLS by default though. Other options:

  • Make a PODMAN_PUSH_FLAGS var so you can make PODMAN_PUSH_FLAGS=--tls-verify=false podman-dev-push when your registry is "insecure" (or whatever).
  • Configure your personal insecure registries per the man page:

If not specified, TLS verification is used unless the target registry is listed as an insecure registry in containers-registries.conf(5)


# 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 -
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1

This script is explicitly for folks setting up hive on non-openshifts.

And most of the time, people have them (sym)linked to each other anyway.

efried@efried-thinkpadp16vgen1:~/go/src/github.com/openshift/hive$ ll -i ~/bin/oc ~/bin/kubectl
2567104 -rwxr-xr-x. 2 efried efried 160441224 Jul 18 16:42 /home/efried/bin/kubectl*
2567104 -rwxr-xr-x. 2 efried efried 160441224 Jul 18 16:42 /home/efried/bin/oc*

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 -
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto (and below)

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