Documentation ¶
Index ¶
- func ConfigureCRDs(ctx context.Context, restConfig *rest.Config, ...) error
- func LogLevelIsAtLeastDebug() bool
- func Main(ctx context.Context, version string, args ...string) error
- func PodNamespace() string
- func Run(ctx context.Context, namespace, svcname string, httpPort, httpsPort int, ...) error
- func ServeHTTP(ctx context.Context, port int) error
- func ServeHTTPS(ctx context.Context, port int, ca *CA, scheme *k8sRuntime.Scheme) error
- type CA
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureCRDs ¶
func ConfigureCRDs( ctx context.Context, restConfig *rest.Config, serviceName, serviceNamespace string, caSecret *k8sTypesCoreV1.Secret, scheme *k8sRuntime.Scheme, ) error
ConfigureCRDs uses 'restConfig' to look at all CustomResourceDefinitions that are mentioned in 'scheme', and adjusts each of their .spec.conversion.webhook.clientConfig.caBundle to match the "tls.crt" field in 'caSecret'.
func LogLevelIsAtLeastDebug ¶ added in v2.1.2
func LogLevelIsAtLeastDebug() bool
func Main ¶
Main is a `github.com/datawire/ambassador/v2/pkg/busy`-compatible wrapper around 'Run()', using values appropriate for the stock Emissary.
func PodNamespace ¶
func PodNamespace() string
PodNamespace is borrowed from "k8s.io/client-go/tools/clientcmd".inClusterConfig.Namespace()
func Run ¶
func Run(ctx context.Context, namespace, svcname string, httpPort, httpsPort int, scheme *k8sRuntime.Scheme) error
Run runs the Emissary apiext server process, but takes enough arguments that you should be able to reuse it to implement your own apiext server.
func ServeHTTPS ¶
Types ¶
type CA ¶
type CA struct { Cert *x509.Certificate Key *rsa.PrivateKey // contains filtered or unexported fields }
CA is a Certificat Authority that can mint new TLS certificates.
func EnsureCA ¶
func EnsureCA(ctx context.Context, restConfig *rest.Config, namespace string) (*CA, *k8sTypesCoreV1.Secret, error)
EnsureCA ensures that a Kubernetes Secret named "emissary-ingress-webhook-ca" exists in the given namespace (creating it if it doesn't), and returns both the Secret itself and a CA using the information from the Secret.