Documentation
¶
Overview ¶
Package controlplaneurl derives the URL that operator components use for Coder API calls to a CoderControlPlane.
Index ¶
- Constants
- func CoderAPIURL(controlPlane *coderv1alpha1.CoderControlPlane) (*url.URL, error)
- func HTTPServicePort(controlPlane *coderv1alpha1.CoderControlPlane) (int32, error)
- func InternalHTTPURL(controlPlane *coderv1alpha1.CoderControlPlane) string
- func TLSEnabled(controlPlane *coderv1alpha1.CoderControlPlane) bool
Constants ¶
const DefaultServicePort = int32(80)
DefaultServicePort is the Service port of a CoderControlPlane when spec.service.port is not set. Coder serves plain HTTP on it.
Variables ¶
This section is empty.
Functions ¶
func CoderAPIURL ¶
func CoderAPIURL(controlPlane *coderv1alpha1.CoderControlPlane) (*url.URL, error)
CoderAPIURL returns the URL for Coder API calls with the operator token. It is status.url when that is HTTP. With TLS, status.url is HTTPS on the Service name, which certificates rarely cover, so it is the internal HTTP URL instead. The operator token then travels over plain HTTP inside the cluster.
func HTTPServicePort ¶
func HTTPServicePort(controlPlane *coderv1alpha1.CoderControlPlane) (int32, error)
HTTPServicePort returns the Service port that serves plain HTTP.
func InternalHTTPURL ¶
func InternalHTTPURL(controlPlane *coderv1alpha1.CoderControlPlane) string
InternalHTTPURL returns the plain HTTP URL of the control plane Service, or "" when it cannot be derived.
func TLSEnabled ¶
func TLSEnabled(controlPlane *coderv1alpha1.CoderControlPlane) bool
TLSEnabled reports whether the control plane serves TLS.
Types ¶
This section is empty.