Documentation
¶
Index ¶
- func CreateCapp(g Gomega, k8sClient client.Client, capp *cappv1alpha1.Capp) *cappv1alpha1.Capp
- func CreateCappWithHTTPHostname(g Gomega, k8sClient client.Client) (*cappv1alpha1.Capp, string)
- func CreateCappWithLogger(g Gomega, logType cappv1alpha1.LogType, k8sClient client.Client) *cappv1alpha1.Capp
- func CreateCredentialsSecret(logType cappv1alpha1.LogType, k8sClient client.Client)
- func CreateExcludedServiceAccount(k8sClient client.Client)
- func CreateHTTPSCapp(g Gomega, k8sClient client.Client) (*cappv1alpha1.Capp, string)
- func CreateSecret(k8sClient client.Client, secret *corev1.Secret)
- func CreateTestUser(k8sClient client.Client, namespace string)
- func DeleteCapp(g Gomega, k8sClient client.Client, capp *cappv1alpha1.Capp)
- func DeleteExcludedServiceAccount(k8sClient client.Client)
- func DeleteTestUser(k8sClient client.Client, namespace string)
- func GenerateCappName() string
- func GenerateCertSecretName(hostname string) string
- func GenerateResourceName(hostname, suffix string) string
- func GenerateRouteHostname() string
- func GenerateSecretName() string
- func GenerateUniqueCappName(baseCappName string) string
- func GetCapp(k8sClient client.Client, name string, namespace string) *cappv1alpha1.Capp
- func GetCappConfig(k8sClient client.Client, name string, namespace string) *cappv1alpha1.CappConfig
- func GetCappRevision(k8sClient client.Client, cappRevisionName, namespace string) *cappv1alpha1.CappRevision
- func GetCappRevisions(ctx context.Context, k8sClient client.Client, capp cappv1alpha1.Capp) ([]cappv1alpha1.CappRevision, error)
- func GetCertificate(k8sClient client.Client, name string, namespace string) *cmapi.Certificate
- func GetDNSRecord(k8sClient client.Client, name, namespace string) *dnsrecordv1alpha1.CNAMERecord
- func GetDomainMapping(k8sClient client.Client, name string, namespace string) *knativev1beta1.DomainMapping
- func GetKSVC(k8sClient client.Client, name string, namespace string) *knativev1.Service
- func GetNFSPVC(k8sClient client.Client, name string, namespace string) *nfspvcv1alpha1.NfsPvc
- func GetPingSource(k8sClient client.Client, name string, namespace string) *sourcesv1.PingSource
- func GetResource(k8sClient client.Client, obj client.Object, name, namespace string)
- func GetRevision(k8sClient client.Client, name string, namespace string) *knativev1.Revision
- func GetSecret(k8sClient client.Client, name string, namespace string) *corev1.Secret
- func GetSyslogNGFlow(k8sClient client.Client, name string, namespace string) *loggingv1beta1.SyslogNGFlow
- func GetSyslogNGOutput(k8sClient client.Client, name string, namespace string) *loggingv1beta1.SyslogNGOutput
- func NewRetryOnConflictBackoff() wait.Backoff
- func ResourceExists(k8sClient client.Client, obj client.Object) (bool, error)
- func SwitchUser(k8sClient *client.Client, cfg *rest.Config, namespace string, ...)
- func UpdateResource(k8sClient client.Client, object client.Object) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCapp ¶
func CreateCapp(g Gomega, k8sClient client.Client, capp *cappv1alpha1.Capp) *cappv1alpha1.Capp
CreateCapp creates a new Capp instance with a unique name and returns it.
func CreateCappWithHTTPHostname ¶
func CreateCappWithHTTPHostname(g Gomega, k8sClient client.Client) (*cappv1alpha1.Capp, string)
CreateCappWithHTTPHostname creates a Capp with a Hostname.
func CreateCappWithLogger ¶
func CreateCappWithLogger(g Gomega, logType cappv1alpha1.LogType, k8sClient client.Client) *cappv1alpha1.Capp
CreateCappWithLogger creates a Capp instance with the specified logger type and returns the created Capp object.
func CreateCredentialsSecret ¶
func CreateCredentialsSecret(logType cappv1alpha1.LogType, k8sClient client.Client)
CreateCredentialsSecret creates a Kubernetes secret containing credentials for the specified logger type.
func CreateExcludedServiceAccount ¶
CreateExcludedServiceAccount configures a service account that should be excluded from the mutating webhook.
func CreateHTTPSCapp ¶
func CreateHTTPSCapp(g Gomega, k8sClient client.Client) (*cappv1alpha1.Capp, string)
CreateHTTPSCapp creates a Capp with a Hostname, TLS Enabled and TLSSecret.
func CreateSecret ¶
CreateSecret creates a new secret, ignoring AlreadyExists errors.
func CreateTestUser ¶
CreateTestUser creates a test user with the specified Kubernetes client and namespace.
func DeleteCapp ¶
func DeleteCapp(g Gomega, k8sClient client.Client, capp *cappv1alpha1.Capp)
DeleteCapp deletes an existing Capp instance.
func DeleteExcludedServiceAccount ¶
DeleteExcludedServiceAccount deletes the excluded user created in the specified namespace.
func DeleteTestUser ¶
DeleteTestUser deletes the test user created in the specified namespace.
func GenerateCappName ¶
func GenerateCappName() string
GenerateCappName generates a new name for Capp.
func GenerateCertSecretName ¶
GenerateCertSecretName generates a capp cert secret name.
func GenerateResourceName ¶
GenerateResourceName generates the hostname based on the provided suffix and a dot (".") trailing character. It returns the adjusted hostname, where the suffix (minus the trailing character) is added if not already present.
func GenerateRouteHostname ¶
func GenerateRouteHostname() string
GenerateRouteHostname generates a new route hostname by calling generateName with the predefined RouteHostname as the baseName.
func GenerateSecretName ¶
func GenerateSecretName() string
GenerateSecretName generates a new secret name by calling generateName with the predefined RouteTlsSecret as the baseName.
func GenerateUniqueCappName ¶
GenerateUniqueCappName generates a unique Capp name.
func GetCappConfig ¶
func GetCappConfig(k8sClient client.Client, name string, namespace string) *cappv1alpha1.CappConfig
GetCappConfig fetches and returns an existing instance of an existing cappConfig
func GetCappRevision ¶
func GetCappRevision(k8sClient client.Client, cappRevisionName, namespace string) *cappv1alpha1.CappRevision
GetCappRevision retrieves a CappRevision by name.
func GetCappRevisions ¶
func GetCappRevisions(ctx context.Context, k8sClient client.Client, capp cappv1alpha1.Capp) ([]cappv1alpha1.CappRevision, error)
GetCappRevisions retrieves a list of CappRevision resources filtered by labels matching a specific Capp, returning the list and any error encountered.
func GetCertificate ¶
GetCertificate fetches and returns an existing instance of a Certificate.
func GetDNSRecord ¶
func GetDNSRecord(k8sClient client.Client, name, namespace string) *dnsrecordv1alpha1.CNAMERecord
GetDNSRecord fetches and returns an existing instance of a CNAMERecord.
func GetDomainMapping ¶
func GetDomainMapping(k8sClient client.Client, name string, namespace string) *knativev1beta1.DomainMapping
GetDomainMapping fetches and returns an existing instance of a DomainMapping.
func GetPingSource ¶ added in v0.9.0
GetPingSource fetches and returns an existing instance of a Knative PingSource.
func GetResource ¶
GetResource fetches a resource into obj. NotFound is silently ignored so the caller receives a zero-value obj; any other API error fails the test.
func GetRevision ¶
GetRevision fetches and returns an existing instance of a Knative Revision.
func GetSyslogNGFlow ¶
func GetSyslogNGFlow(k8sClient client.Client, name string, namespace string) *loggingv1beta1.SyslogNGFlow
GetSyslogNGFlow fetches existing and returns an instance of a SyslogNGFlow.
func GetSyslogNGOutput ¶
func GetSyslogNGOutput(k8sClient client.Client, name string, namespace string) *loggingv1beta1.SyslogNGOutput
GetSyslogNGOutput fetches existing and returns an instance of a SyslogNGOutput.
func NewRetryOnConflictBackoff ¶
NewRetryOnConflictBackoff returns a preconfigured backoff for RetryOnConflict.
func ResourceExists ¶ added in v0.9.2
ResourceExists checks if a given Kubernetes object exists in the cluster. Returns (false, nil) when the object is not found, and (false, err) on any other API error.
func SwitchUser ¶
func SwitchUser(k8sClient *client.Client, cfg *rest.Config, namespace string, scheme *runtime.Scheme, serviceAccountName string)
SwitchUser switches the Kubernetes client's user context to the given serviceAccountName if it's not empty. If serviceAccountName is empty, it reverts to the original context.
Types ¶
This section is empty.