Documentation ¶
Index ¶
- Constants
- Variables
- func ClientScopeDifferenceIntersection(a []v1alpha1.KeycloakClientScope, b []v1alpha1.KeycloakClientScope) (d []v1alpha1.KeycloakClientScope, i []v1alpha1.KeycloakClientScope)
- func ClientSecret(cr *v1alpha1.KeycloakClient) *v1.Secret
- func ClientSecretReconciled(cr *v1alpha1.KeycloakClient, currentState *v1.Secret) *v1.Secret
- func ClientSecretSelector(cr *v1alpha1.KeycloakClient) client.ObjectKey
- func DeprecatedClientSecret(cr *v1alpha1.KeycloakClient) *v1.Secret
- func DeprecatedClientSecretSelector(cr *v1alpha1.KeycloakClient) client.ObjectKey
- func FilterClientScopesByNames(clientScopes []v1alpha1.KeycloakClientScope, names []string) (filteredScopes []v1alpha1.KeycloakClientScope)
- func GenerateRandomBytes(n int) []byte
- func GenerateRandomString(s int) string
- func GetExternalDatabaseHost(secret *v1.Secret) string
- func GetExternalDatabaseName(secret *v1.Secret) string
- func GetExternalDatabasePort(secret *v1.Secret) int32
- func GetRealmUserSecretName(keycloakNamespace, realmName, userName string) string
- func IsIP(host []byte) bool
- func KeycloakAdminSecret(cr *v1alpha1.ExternalKeycloak) *v1.Secret
- func KeycloakAdminSecretReconciled(cr *v1alpha1.ExternalKeycloak, currentState *v1.Secret) *v1.Secret
- func KeycloakAdminSecretSelector(cr *v1alpha1.ExternalKeycloak) client.ObjectKey
- func MergeEnvs(a []v1.EnvVar, b []v1.EnvVar) []v1.EnvVar
- func RealmCredentialSecret(cr *v1alpha1.KeycloakRealm, user *v1alpha1.KeycloakAPIUser, ...) *v1.Secret
- func RealmCredentialSecretSelector(cr *v1alpha1.KeycloakRealm, user *v1alpha1.KeycloakAPIUser, ...) client.ObjectKey
- func RoleDifferenceIntersection(a []v1alpha1.RoleRepresentation, b []v1alpha1.RoleRepresentation) (d []v1alpha1.RoleRepresentation, i []v1alpha1.RoleRepresentation)
- func SanitizeNumberOfReplicas(numberOfReplicas int, isCreate bool) *int32
- func SanitizeResourceName(name string) string
- func SanitizeResourceNameWithAlphaNum(text string) string
Constants ¶
View Source
const ( ApplicationName = "keycloak" MonitoringKey = "middleware" DatabaseSecretName = ApplicationName + "-db-secret" PostgresqlPersistentVolumeName = ApplicationName + "-postgresql-claim" PostgresqlBackupPersistentVolumeName = ApplicationName + "-backup" PostgresqlDeploymentName = ApplicationName + "-postgresql" KeycloakProbesName = ApplicationName + "-probes" KeycloakMetricsRouteName = ApplicationName + "-metrics-rewrite" KeycloakMetricsRoutePath = "/auth/realms/master/metrics" KeycloakMetricsRouteRewritePath = "/auth/realms/master" PostgresqlDeploymentComponent = "database" PostgresqlServiceName = ApplicationName + "-postgresql" KeycloakDiscoveryServiceName = ApplicationName + "-discovery" KeycloakMonitoringServiceName = ApplicationName + "-monitoring" KeycloakDeploymentName = ApplicationName KeycloakDeploymentComponent = "keycloak" PostgresqlBackupComponent = "database-backup" PostgresqlDatabase = "root" PostgresqlUsername = ApplicationName PostgresqlPasswordLength = 32 PostgresqlPersistentVolumeCapacity = "1Gi" PostgresqlPersistentVolumeMountPath = "/var/lib/pgsql/data" DatabaseSecretUsernameProperty = "POSTGRES_USERNAME" // nolint DatabaseSecretPasswordProperty = "POSTGRES_PASSWORD" // nolint // Required by the Integreately Backup Image DatabaseSecretHostProperty = "POSTGRES_HOST" // nolint // Required by the Integreately Backup Image DatabaseSecretDatabaseProperty = "POSTGRES_DATABASE" // nolint // Required by the Integreately Backup Image DatabaseSecretVersionProperty = "POSTGRES_VERSION" // nolint DatabaseSecretExternalAddressProperty = "POSTGRES_EXTERNAL_ADDRESS" // nolint DatabaseSecretExternalPortProperty = "POSTGRES_EXTERNAL_PORT" // nolint KeycloakServicePort = 8443 PostgresDefaultPort = 5432 AdminUsernameProperty = "ADMIN_USERNAME" AdminPasswordProperty = "ADMIN_PASSWORD" ServingCertSecretName = "sso-x509-https-secret" // nolint LivenessProbeProperty = "liveness_probe.sh" ReadinessProbeProperty = "readiness_probe.sh" RouteLoadBalancingStrategy = "source" IngressDefaultHost = "keycloak.local" PostgresqlBackupServiceAccountName = "keycloak-realm-operator" KeycloakExtensionEnvVar = "KEYCLOAK_EXTENSIONS" KeycloakExtensionPath = "/opt/jboss/keycloak/standalone/deployments" KeycloakExtensionsInitContainerPath = "/opt/extensions" RhssoExtensionPath = "/opt/eap/standalone/deployments" ClientSecretName = ApplicationName + "-client-secret" ClientSecretClientIDProperty = "CLIENT_ID" ClientSecretClientSecretProperty = "CLIENT_SECRET" ServiceMonitorName = ApplicationName + "-service-monitor" MigrateBackupName = "migrate-backup" DatabaseSecretSslModeProperty = "SSLMODE" DatabaseSecretSslCert = ApplicationName + "-db-ssl-cert-secret" RhssoDatabaseXAConnectionParamsProperty = "DB_XA_CONNECTION_PROPERTY" RhssoDatabaseNONXAConnectionParamsProperty = "DB_CONNECTION_PROPERTY" KeycloakDatabaseConnectionParamsProperty = "JDBC_PARAMS" KeycloakCertificatePath = "/opt/jboss/.postgresql" RhssoCertificatePath = "/home/jboss/.postgresql" )
Constants for a community Keycloak installation
Variables ¶
View Source
var PodLabels = map[string]string{}
Functions ¶
func ClientScopeDifferenceIntersection ¶
func ClientScopeDifferenceIntersection(a []v1alpha1.KeycloakClientScope, b []v1alpha1.KeycloakClientScope) (d []v1alpha1.KeycloakClientScope, i []v1alpha1.KeycloakClientScope)
FIXME Find a better way to refactor this code with role difference part above returned clientScopes are always from a
func ClientSecret ¶
func ClientSecret(cr *v1alpha1.KeycloakClient) *v1.Secret
func ClientSecretReconciled ¶
func ClientSecretSelector ¶
func ClientSecretSelector(cr *v1alpha1.KeycloakClient) client.ObjectKey
func DeprecatedClientSecret ¶
func DeprecatedClientSecret(cr *v1alpha1.KeycloakClient) *v1.Secret
func DeprecatedClientSecretSelector ¶
func DeprecatedClientSecretSelector(cr *v1alpha1.KeycloakClient) client.ObjectKey
func FilterClientScopesByNames ¶
func FilterClientScopesByNames(clientScopes []v1alpha1.KeycloakClientScope, names []string) (filteredScopes []v1alpha1.KeycloakClientScope)
func GenerateRandomBytes ¶
GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GenerateRandomString ¶
GenerateRandomString returns a URL-safe, base64 encoded securely generated random string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GetExternalDatabaseHost ¶
func GetExternalDatabaseName ¶
func GetExternalDatabasePort ¶
func GetRealmUserSecretName ¶
func KeycloakAdminSecret ¶
func KeycloakAdminSecret(cr *v1alpha1.ExternalKeycloak) *v1.Secret
func KeycloakAdminSecretSelector ¶
func KeycloakAdminSecretSelector(cr *v1alpha1.ExternalKeycloak) client.ObjectKey
func RealmCredentialSecret ¶
func RealmCredentialSecret(cr *v1alpha1.KeycloakRealm, user *v1alpha1.KeycloakAPIUser, keycloak *v1alpha1.ExternalKeycloak) *v1.Secret
func RealmCredentialSecretSelector ¶
func RealmCredentialSecretSelector(cr *v1alpha1.KeycloakRealm, user *v1alpha1.KeycloakAPIUser, keycloak *v1alpha1.ExternalKeycloak) client.ObjectKey
func RoleDifferenceIntersection ¶
func RoleDifferenceIntersection(a []v1alpha1.RoleRepresentation, b []v1alpha1.RoleRepresentation) (d []v1alpha1.RoleRepresentation, i []v1alpha1.RoleRepresentation)
returned roles are always from a
func SanitizeResourceName ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.