Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ci(oci): helm repackaging #177

Merged
merged 7 commits into from
Jul 17, 2024
Merged

Conversation

andrewazores
Copy link
Member

See #176 #173

@tthvo
Copy link
Member

tthvo commented Jul 17, 2024

I see charts are now available in multiple places:

Helm repo:

OCI registry:

  • ghcr

Make sense to document these on README?

Copy link
Member

@tthvo tthvo left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@andrewazores andrewazores merged commit 3e27723 into cryostatio:main Jul 17, 2024
5 checks passed
@andrewazores andrewazores deleted the ci-helm-pkg branch July 17, 2024 20:16
@andrewazores
Copy link
Member Author

Thanks for the help figuring this out @tthvo , finally done: https://github.com/cryostatio/cryostat-helm/pkgs/container/cryostat-helm

@andrewazores
Copy link
Member Author

$ helm install cryostat oci://ghcr.io/cryostatio/cryostat-helm --version 2.0.0-dev
Pulled: ghcr.io/cryostatio/cryostat-helm:2.0.0-dev
Digest: sha256:45c32e72db4d3b1cb8206f569e5f854b56e79cadb6c95bb45d46e8ee9d894595
NAME: cryostat
LAST DEPLOYED: Wed Jul 17 16:19:51 2024
NAMESPACE: plugin--cryostat
STATUS: deployed
REVISION: 1
NOTES:
1. Tell Cryostat how to serve external traffic:

export POD_NAME=$(kubectl get pods -n plugin--cryostat -l "app.kubernetes.io/name=cryostat-helm,app.kubernetes.io/instance=cryostat" --sort-by=.metadata.creationTimestamp -o jsonpath="{.items[-1:].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod -n plugin--cryostat $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")


2. Forward local ports to the application's pod:

export POD_NAME=$(kubectl get pods -n plugin--cryostat -l "app.kubernetes.io/name=cryostat-helm,app.kubernetes.io/instance=cryostat" --sort-by=.metadata.creationTimestamp -o jsonpath="{.items[-1:].metadata.name}")
kubectl -n plugin--cryostat wait --for=condition=available --timeout=60s deploy/cryostat-cryostat-helm
kubectl -n plugin--cryostat port-forward $POD_NAME 8080:$CONTAINER_PORT


3. Visit the CryostatHelm application at: 

http://localhost:8080

@tthvo
Copy link
Member

tthvo commented Jul 17, 2024

Nicee! Though, the chart name is now cryostat-helm, which might be a bit odd + some tiny user-facing issue, for example:

Visit the CryostatHelm application at: 

@tthvo
Copy link
Member

tthvo commented Jul 17, 2024

helm install cryostat oci://ghcr.io/cryostatio/cryostat-helm --version 2.0.0-dev

This works for me. Small note is that if users have an expired token for ghcr.io registry with podman/docker, the command will fail with 403 (happened to me).

@andrewazores
Copy link
Member Author

I suppose the NOTES.txt can be updated so the message doesn't look odd like that.

Publishing to quay.io might also be useful since it allows unauthenticated pulls, and I guess the README can note that ghcr.io requires authentication.

@tthvo
Copy link
Member

tthvo commented Jul 17, 2024

This works for me. Small note is that if users have an expired token for ghcr.io registry with podman/docker, the command will fail with 403 (happened to me).
Publishing to quay.io might also be useful since it allows unauthenticated pulls, and I guess the README can note that ghcr.io requires authentication.

Oh actually here I meant I can pull the image unauthenticated. Just that if there is an expired token, it fails even though the image is public :D

@tthvo
Copy link
Member

tthvo commented Jul 17, 2024

I suppose the NOTES.txt can be updated so the message doesn't look odd like that.

I guess it can just be Cryostat.

{{ $listNum }}. {{ "Visit the " }}{{ .Chart.Name | camelcase }}{{ " application at: " }}

@tthvo
Copy link
Member

tthvo commented Jul 17, 2024

Or we can add some annotations:

https://helm.sh/docs/topics/charts/#the-chartyaml-file

for example, appName: Cryostat. So that downstream can give a different name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants