Documentation ¶
Index ¶
- Constants
- func AsDeployment(obj client.Object) (*appsv1.Deployment, error)
- func AsIngress(obj client.Object) (*networkingv1.Ingress, error)
- func CertManagerEnabled(adapter gitlab.CustomResourceAdapter) bool
- func CertificateIssuer(adapter gitlab.CustomResourceAdapter) *certmanagerv1.Issuer
- func ExporterServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
- func ExposePrometheusCluster(cr *gitlabv1beta1.GitLab) *corev1.Service
- func GetIssuerConfig(adapter gitlab.CustomResourceAdapter) certmanagerv1.IssuerConfig
- func GetPodTemplateSpec(obj client.Object) (*corev1.PodTemplateSpec, error)
- func GitalyServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
- func IsOpenshift() bool
- func Label(resource, component, resourceType string) map[string]string
- func PopulateAttachedSecrets(template v1.PodTemplateSpec) map[string]map[string]struct{}
- func PostgresqlServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
- func PrometheusCluster(cr *gitlabv1beta1.GitLab) *monitoringv1.Prometheus
- func PrometheusClusterEnabled(adapter gitlab.CustomResourceAdapter) bool
- func RedisServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
- func SecretChecksum(secret v1.Secret, keys map[string]struct{}) string
- func ServiceAccount(name, namespace string) *corev1.ServiceAccount
- func ToggleDeploymentPause(obj client.Object, pause bool) error
- func WebserviceServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
- type EndpointTLS
- type KubeConfig
Constants ¶
const (
// GitlabType represents resource of type Gitlab.
GitlabType = "gitlab"
)
Variables ¶
This section is empty.
Functions ¶
func AsDeployment ¶
func AsDeployment(obj client.Object) (*appsv1.Deployment, error)
func CertManagerEnabled ¶
func CertManagerEnabled(adapter gitlab.CustomResourceAdapter) bool
CertManager returns `true` if CertManager is enabled, and `false` if not.
func CertificateIssuer ¶
func CertificateIssuer(adapter gitlab.CustomResourceAdapter) *certmanagerv1.Issuer
CertificateIssuer create a certificate generator.
func ExporterServiceMonitor ¶
func ExporterServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
ExporterServiceMonitor returns the GitLab exporter service monitor.
func ExposePrometheusCluster ¶
func ExposePrometheusCluster(cr *gitlabv1beta1.GitLab) *corev1.Service
ExposePrometheusCluster creates a service for Prometheus.
func GetIssuerConfig ¶
func GetIssuerConfig(adapter gitlab.CustomResourceAdapter) certmanagerv1.IssuerConfig
GetIssuerConfig gets the ACME issuer to use from GitLab resource.
func GetPodTemplateSpec ¶
func GetPodTemplateSpec(obj client.Object) (*corev1.PodTemplateSpec, error)
func GitalyServiceMonitor ¶
func GitalyServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
GitalyServiceMonitor returns the Gitaly service monitor.
func IsOpenshift ¶
func IsOpenshift() bool
IsOpenshift check if API has the API route.openshift.io/v1, then it is considered an openshift environment.
func PopulateAttachedSecrets ¶
func PopulateAttachedSecrets(template v1.PodTemplateSpec) map[string]map[string]struct{}
PopulateAttachedSecrets populates all the Secrets that are attached to a ReplicaSet. nolint:nestif,gocognit // This function is a bit complicated, but breaking it up may not increase legibility.
func PostgresqlServiceMonitor ¶
func PostgresqlServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
PostgresqlServiceMonitor returns the Postgres service monitor.
func PrometheusCluster ¶
func PrometheusCluster(cr *gitlabv1beta1.GitLab) *monitoringv1.Prometheus
PrometheusCluster returns a prometheus cluster object.
func PrometheusClusterEnabled ¶
func PrometheusClusterEnabled(adapter gitlab.CustomResourceAdapter) bool
PrometheusEnabled returns `true` if Prometheus is enabled, and `false` if not.
func RedisServiceMonitor ¶
func RedisServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
RedisServiceMonitor returns the Redis service monitor.
func SecretChecksum ¶
SecretChecksum returns a checksum for a given Secret.
func ServiceAccount ¶
func ServiceAccount(name, namespace string) *corev1.ServiceAccount
ServiceAccount returns service account to be used by pods.
func WebserviceServiceMonitor ¶
func WebserviceServiceMonitor(cr *gitlabv1beta1.GitLab) *monitoringv1.ServiceMonitor
WebserviceServiceMonitor returns the Webservice service monitor.
Types ¶
type EndpointTLS ¶
type EndpointTLS struct {
// contains filtered or unexported fields
}
EndpointTLS informs which services require to be secured using generated TLS certificates.
func RequiresCertManagerCertificate ¶
func RequiresCertManagerCertificate(adapter gitlab.CustomResourceAdapter) EndpointTLS
RequiresCertManagerCertificate function returns true an administrator did not provide a TLS ceritificate for an endpoint.
func (EndpointTLS) Any ¶
func (ep EndpointTLS) Any() bool
Any returns true if any ingress requires a cert-manager certificate.
func (EndpointTLS) GitLab ¶
func (ep EndpointTLS) GitLab() bool
GitLab returns true if GitLab endpoint requires a cert-manager provisioned certificate.
func (EndpointTLS) Minio ¶
func (ep EndpointTLS) Minio() bool
Minio returns true if Minio endpoint requires a cert-manager provisioned certificate.
func (EndpointTLS) Registry ¶
func (ep EndpointTLS) Registry() bool
Registry returns true if Registry endpoint requires a cert-manager provisioned certificate.
type KubeConfig ¶
KubeConfig returns kubernetes client configuration.
func KubernetesConfig ¶
func KubernetesConfig() KubeConfig
KubernetesConfig returns kubernetes client config.
func (KubeConfig) NewKubernetesClient ¶
func (k KubeConfig) NewKubernetesClient() (*kubernetes.Clientset, error)
NewKubernetesClient returns a client that can be used to interact with the kubernetes api.