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

Allow HTTPS for Snap Store Proxy Configuration in CAPI MicroK8s Bootstrap Script #108

Closed
mateofloreza opened this issue Jun 12, 2024 · 1 comment
Assignees

Comments

@mateofloreza
Copy link

mateofloreza commented Jun 12, 2024

Currently, in the preruncmd script for configuring the Snap Store proxy within the Cluster API MicroK8s Bootstrap Provider, the Snap Store proxy domain is hardcoded to use HTTP. I propose that this should be configurable to allow the use of HTTPS as well.

Steps to Reproduce

Deploy a Kubernetes cluster using Cluster API with MicroK8s.
Configure the Snap Store proxy using the snapstoreProxyDomain and snapstoreProxyId parameters.
Observe the preruncmd script attempting to use HTTP to configure the Snap Store proxy.

Expected Behavior

The preruncmd script should allow the Snap Store proxy to be configured using HTTPS. The URL should be fully configurable as part of the CRD.
Actual Behavior

The preruncmd script currently hardcodes the use of HTTP when configuring the Snap Store proxy:

while ! curl -sL http://"${1}"/v2/auth/store/assertions | snap ack /dev/stdin ; do
  echo "Failed to ACK store assertions, will retry"
  sleep 5
done

Proposed Change

Modify the preruncmd script to allow the full URL to be specified as part of the CRD, enabling the use of HTTPS if desired. For example, the script could be updated to:

while ! curl -sL "${1}"/v2/auth/store/assertions | snap ack /dev/stdin ; do
  echo "Failed to ACK store assertions, will retry"
  sleep 5
done

This change allows users to specify either HTTP or HTTPS in the snapstoreProxyDomain parameter.

@eaudetcobello
Copy link

eaudetcobello commented Jul 30, 2024

Hi @mateofloreza ,

Thanks for reporting this issue!

I've implemented the fix in v6.0.10

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

No branches or pull requests

2 participants