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.
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
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:
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:
This change allows users to specify either HTTP or HTTPS in the snapstoreProxyDomain parameter.