Documentation
¶
Index ¶
- Constants
- Variables
- func CreateCertSecretName(name string) string
- func CreateLabels(opts ...LabelOpt) map[string]string
- func GetKubeConfig() (*rest.Config, error)
- func NewCertificate(name, namespace string, opts ...CertificateOption) *cm.Certificate
- func NewClusterIssuer(opts ...ClusterIssuerOption) *cm.ClusterIssuer
- func NewIngressRoute(name, namespace string, opts ...IngressRouteOption) *traefikv1alpha1.IngressRoute
- type CertificateOption
- type ClusterIssuerOption
- func WithClusterIssuerACMEDNS01(email, server, name, apikeyName, apikeyRef string, dnsZones []string) ClusterIssuerOption
- func WithClusterIssuerACMEHTTP01(email, name string) ClusterIssuerOption
- func WithClusterIssuerCustomName(name string) ClusterIssuerOption
- func WithClusterIssuerSelfSigned() ClusterIssuerOption
- type GVR
- type IngressRouteOption
- type K8sClient
- func (k K8sClient) CreateCertificate(ctx context.Context, name, namespace string, opts ...CertificateOption) (*cm.Certificate, error)
- func (k K8sClient) CreateClusterIssuer(ctx context.Context, opts ...ClusterIssuerOption) (*cm.ClusterIssuer, error)
- func (k K8sClient) CreateIngress(ctx context.Context, name, namespace string, opts ...IngressRouteOption) (*traefikv1alpha1.IngressRoute, error)
- func (k K8sClient) GetCertificate(ctx context.Context, name, namespace string) (*v1.Service, error)
- func (k K8sClient) GetDeployment(ctx context.Context, name, namespace string) (*appsv1.Deployment, error)
- func (k K8sClient) GetService(ctx context.Context, name, namespace string) (*v1.Service, error)
- func (k K8sClient) ListCertificates(ctx context.Context, namespace string) (*unstructured.UnstructuredList, error)
- func (k K8sClient) ListDeployments(ctx context.Context, namespace string) (*appsv1.DeploymentList, error)
- func (k K8sClient) ListIngresses(ctx context.Context, namespace string) (*unstructured.UnstructuredList, error)
- func (k K8sClient) ListPods(ctx context.Context, namespace string) (*v1.PodList, error)
- func (k K8sClient) ListServices(ctx context.Context, namespace string) (*v1.ServiceList, error)
- func (k K8sClient) UpdateCertificate(ctx context.Context, name, namespace string, opts ...CertificateOption) (*cm.Certificate, error)
- func (k K8sClient) UpdateClusterIssuer(ctx context.Context, name string, opts ...ClusterIssuerOption) (*cm.ClusterIssuer, error)
- func (k K8sClient) UpdateIngress(ctx context.Context, name, namespace string, opts ...IngressRouteOption) (*traefikv1alpha1.IngressRoute, error)
- type LabelOpt
- type LabelOpts
Constants ¶
View Source
const ( EntryPointWeb = "web" EntryPointWebSecure = "websecure" )
View Source
const ( LetsEncryptStaging = "https://acme-staging-v02.api.letsencrypt.org/directory" DefaultIngressRouteName = "ingressroute" )
Variables ¶
Functions ¶
func CreateCertSecretName ¶
func CreateLabels ¶
func GetKubeConfig ¶
GetKubeConfig checks whether KUBECONFIG environment variable is set. If it is set, uses it as kubeconfig. if it isn't, falls back to InClusterConfig.
func NewCertificate ¶
func NewCertificate(name, namespace string, opts ...CertificateOption) *cm.Certificate
func NewClusterIssuer ¶
func NewClusterIssuer(opts ...ClusterIssuerOption) *cm.ClusterIssuer
func NewIngressRoute ¶
func NewIngressRoute( name, namespace string, opts ...IngressRouteOption, ) *traefikv1alpha1.IngressRoute
Types ¶
type CertificateOption ¶
type CertificateOption func(c *cm.Certificate)
func WithCertificateDomain ¶
func WithCertificateDomain(domain string) CertificateOption
func WithCertificateKind ¶
func WithCertificateKind(kind string) CertificateOption
func WithCertificateName ¶
func WithCertificateName(name string) CertificateOption
type ClusterIssuerOption ¶
type ClusterIssuerOption func(*cm.ClusterIssuer)
func WithClusterIssuerACMEDNS01 ¶
func WithClusterIssuerACMEDNS01( email, server, name, apikeyName, apikeyRef string, dnsZones []string, ) ClusterIssuerOption
func WithClusterIssuerACMEHTTP01 ¶
func WithClusterIssuerACMEHTTP01(email, name string) ClusterIssuerOption
func WithClusterIssuerCustomName ¶
func WithClusterIssuerCustomName(name string) ClusterIssuerOption
func WithClusterIssuerSelfSigned ¶
func WithClusterIssuerSelfSigned() ClusterIssuerOption
type GVR ¶
type GVR struct {
// contains filtered or unexported fields
}
GVR is a kubernetes resource schema Fields are group/version/resources:subresource
func (GVR) GV ¶
func (g GVR) GV() schema.GroupVersion
GV returns the group version scheme representation.
func (GVR) GVK ¶
func (g GVR) GVK() schema.GroupVersionKind
GVK returns a full schema representation.
func (GVR) GVR ¶
func (g GVR) GVR() schema.GroupVersionResource
GVR returns a full schema representation.
type IngressRouteOption ¶
type IngressRouteOption func(*traefikv1alpha1.IngressRoute)
func WithIngressRouteEntryPoint ¶
func WithIngressRouteEntryPoint(entryType string) IngressRouteOption
func WithIngressRouteRule ¶
func WithIngressRouteRule( match, svcName, svcNamespace string, middlewareRefs []string, svcPort int32, ) IngressRouteOption
func WithIngressRouteTLS ¶
func WithIngressRouteTLS(secretName string) IngressRouteOption
type K8sClient ¶
type K8sClient struct { DynamicClient *dynamic.DynamicClient Client *kubernetes.Clientset // contains filtered or unexported fields }
func NewK8sClient ¶
func (K8sClient) CreateCertificate ¶
func (k K8sClient) CreateCertificate( ctx context.Context, name, namespace string, opts ...CertificateOption, ) (*cm.Certificate, error)
func (K8sClient) CreateClusterIssuer ¶
func (k K8sClient) CreateClusterIssuer( ctx context.Context, opts ...ClusterIssuerOption, ) (*cm.ClusterIssuer, error)
func (K8sClient) CreateIngress ¶
func (k K8sClient) CreateIngress( ctx context.Context, name, namespace string, opts ...IngressRouteOption, ) (*traefikv1alpha1.IngressRoute, error)
func (K8sClient) GetCertificate ¶
func (K8sClient) GetDeployment ¶
func (K8sClient) GetService ¶
func (K8sClient) ListCertificates ¶
func (k K8sClient) ListCertificates( ctx context.Context, namespace string, ) (*unstructured.UnstructuredList, error)
func (K8sClient) ListDeployments ¶
func (K8sClient) ListIngresses ¶
func (k K8sClient) ListIngresses( ctx context.Context, namespace string, ) (*unstructured.UnstructuredList, error)
func (K8sClient) ListServices ¶
func (K8sClient) UpdateCertificate ¶
func (k K8sClient) UpdateCertificate( ctx context.Context, name, namespace string, opts ...CertificateOption, ) (*cm.Certificate, error)
func (K8sClient) UpdateClusterIssuer ¶
func (k K8sClient) UpdateClusterIssuer( ctx context.Context, name string, opts ...ClusterIssuerOption, ) (*cm.ClusterIssuer, error)
func (K8sClient) UpdateIngress ¶
func (k K8sClient) UpdateIngress( ctx context.Context, name, namespace string, opts ...IngressRouteOption, ) (*traefikv1alpha1.IngressRoute, error)
type LabelOpt ¶
type LabelOpt func(*LabelOpts)
func WithComponent ¶
func WithCoreLabel ¶
func WithCustomLabel ¶
Click to show internal directories.
Click to hide internal directories.