Documentation
¶
Index ¶
- Constants
- func AddPodTemplateSpecAnnotation(pts *corev1.PodTemplateSpec, annotation map[string]string)
- func AddSecretResourceVersionAsEnvVar(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication, ...) error
- func CommaSeparatedStringContains(stringList string, value string) int
- func CompareOperandVersion(a string, b string) int
- func CompareStringTimeGreaterThanOrEqual(time1 string, time2 string) (bool, error)
- func ConfigureLTPAConfig(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication, ...)
- func ConfigurePasswordEncryption(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication, ...)
- func ConfigureServiceability(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication)
- func Contains(list []string, s string) bool
- func CreateServiceabilityPVC(instance *wlv1.WebSphereLibertyApplication) *corev1.PersistentVolumeClaim
- func CreateUnstructuredResourceFromSignature(leaderTrackerType string, assetsFolder *string, args ...string) (*unstructured.Unstructured, string, error)
- func CreateUnstructuredResourceListFromSignature(leaderTrackerType string, assetsFolder *string, args ...string) (*unstructured.UnstructuredList, string, error)
- func CreateVolumeMount(mountPath string, fileName string) corev1.VolumeMount
- func CustomizeEncryptionKeyXML(managedEncryptionXMLSecret *corev1.Secret, encryptionKey string) error
- func CustomizeEnvSSO(pts *corev1.PodTemplateSpec, instance *wlv1.WebSphereLibertyApplication, ...) error
- func CustomizeLTPAConfigJob(job *v1.Job, jobRootName string, la *wlv1.WebSphereLibertyApplication, ...)
- func CustomizeLTPAKeysJob(job *v1.Job, jobRootName string, la *wlv1.WebSphereLibertyApplication, ...)
- func CustomizeLTPAServerXML(xmlSecret *corev1.Secret, la *wlv1.WebSphereLibertyApplication, ...) error
- func CustomizeLeaderTracker(leaderTracker *corev1.Secret, trackerList *[]LeaderTracker)
- func CustomizeLibertyAnnotations(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication)
- func CustomizeLibertyEnv(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication, ...) error
- func CustomizeLibertyFileMountXML(mountingPasswordKeySecret *corev1.Secret, mountXMLFileName string, ...) error
- func CustomizeLicenseAnnotations(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication)
- func ExecuteCommandInContainer(config *rest.Config, podName, podNamespace, containerName string, ...) (string, error)
- func GetCommaSeparatedArray(stringList string) []string
- func GetCommaSeparatedString(stringList string, index int) (string, error)
- func GetFirstNumberFromString(target string) string
- func GetLastRotationLabelKey(sharedResourceName string) string
- func GetLeaderTracker(instance *wlv1.WebSphereLibertyApplication, operatorShortName string, ...) (*corev1.Secret, *[]LeaderTracker, error)
- func GetMaxTime(args ...string) (string, error)
- func GetOperandVersionString() (string, error)
- func GetRandomLowerAlphanumericSuffix(length int) string
- func GetRequiredLabels(name string, instance string) map[string]string
- func GetSecretLastRotationAsLabelMap(la *wlv1.WebSphereLibertyApplication, client client.Client, secretName string, ...) (map[string]string, error)
- func GetSecretLastRotationLabel(la *wlv1.WebSphereLibertyApplication, client client.Client, secretName string, ...) (map[string]string, error)
- func GetTrackedResourceName(sharedResourceName string) string
- func GetWLOLicenseAnnotations() map[string]string
- func InsertIntoSortedLeaderTrackers(leaderTrackers *[]LeaderTracker, newLeader *LeaderTracker)
- func IsLTPAJobConfigurationOutdated(job *v1.Job, appLeaderInstance *wlv1.WebSphereLibertyApplication, ...) bool
- func IsLowerAlphanumericSuffix(suffix string) bool
- func IsOperandVersionString(version string) bool
- func IsValidOperandVersion(version string) bool
- func LocalObjectReferenceContainsName(list []corev1.LocalObjectReference, name string) bool
- func MountSecretAsVolume(pts *corev1.PodTemplateSpec, secretName string, volumeMount corev1.VolumeMount)
- func RegisterWithOidcProvider(regData RegisterData) (string, string, error)
- func Remove(list []string, s string) []string
- func RemoveLeaderTracker(leaderTracker *[]LeaderTracker, i int) bool
- func RemoveMapElementByKey(refMap map[string]string, labelKey string)
- func RemovePodTemplateSpecAnnotationByKey(pts *corev1.PodTemplateSpec, annotationKey string)
- func Validate(wlapp *wlv1.WebSphereLibertyApplication) (bool, error)
- type LTPAConfig
- type LTPAMetadata
- type LTPAMetadataList
- type LeaderTracker
- func (tracker *LeaderTracker) ClearOwnerIfMatching(instance string) bool
- func (tracker *LeaderTracker) ClearOwnerIfMatchingAndSharesLastPathParent(instance string, path string) bool
- func (tracker *LeaderTracker) EvictOwner() bool
- func (tracker *LeaderTracker) EvictOwnerIfSubleaseHasExpired() bool
- func (tracker *LeaderTracker) RenewSublease() bool
- func (tracker *LeaderTracker) SetOwner(instance string) bool
- type LeaderTrackerMetadata
- type LeaderTrackerMetadataList
- type PasswordEncryptionMetadata
- type PasswordEncryptionMetadataList
- type RegisterData
Constants ¶
const EncryptionKeyMountXMLFileName = "encryptionKeyMount.xml"
const EncryptionKeyXMLFileName = "encryptionKey.xml"
const LTPAConfigCreationScriptFileName = "create_ltpa_config.sh"
const LTPAKeysCreationScriptFileName = "create_ltpa_keys.sh"
const LTPAKeysFileName = "ltpa.keys"
const LTPAKeysMountXMLFileName = "managedLTPAMount.xml"
const LTPAKeysXMLFileName = "managedLTPA.xml"
const LTPAServerXMLMountSuffix = "-managed-ltpa-mount-server-xml"
const LTPAServerXMLSuffix = "-managed-ltpa-server-xml"
const LeaderVersionLabel = LibertyURI + "/leader-version"
const LibertyURI = "webspherelibertyapplications.liberty.websphere.ibm.com"
const LocalPasswordEncryptionKeyRootName = "wlo-wlp-password-encryption-key"
const ManagedEncryptionMountServerXML = "-managed-encryption-mount-server-xml"
const ManagedEncryptionServerXML = "-managed-encryption-server-xml"
Password encryption constants
const OperandVersion = "1.4.1"
const PasswordEncryptionKeyRootName = "wlp-password-encryption-key"
const ResourceOwnersKey = "owners"
const ResourcePathIndexLabel = LibertyURI + "/resource-path-index"
const ResourcePathIndicesKey = "pathIndices"
const ResourcePathsKey = "paths"
const ResourceSuffixLength = 5
const ResourcesKey = "names"
Leader tracking constants
const SecureMountPath = "/output/resources/liberty-operator"
Mount constants
Variables ¶
This section is empty.
Functions ¶
func AddPodTemplateSpecAnnotation ¶
func AddPodTemplateSpecAnnotation(pts *corev1.PodTemplateSpec, annotation map[string]string)
func AddSecretResourceVersionAsEnvVar ¶
func AddSecretResourceVersionAsEnvVar(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication, client client.Client, secretName string, envNamePrefix string) error
func CommaSeparatedStringContains ¶
returns the index of the contained value in stringList or else -1
func CompareOperandVersion ¶
func CompareStringTimeGreaterThanOrEqual ¶
if time1 >= time2 then return true, otherwise false
func ConfigureLTPAConfig ¶
func ConfigureLTPAConfig(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication, operatorShortName string, ltpaSecretName string, ltpaSuffixName string)
ConfigureLTPA setups the shared-storage for LTPA keys file generation
func ConfigurePasswordEncryption ¶
func ConfigurePasswordEncryption(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication, operatorShortName string, passwordEncryptionMetadata *PasswordEncryptionMetadata)
func ConfigureServiceability ¶
func ConfigureServiceability(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication)
ConfigureServiceability setups the shared-storage for serviceability
func CreateServiceabilityPVC ¶
func CreateServiceabilityPVC(instance *wlv1.WebSphereLibertyApplication) *corev1.PersistentVolumeClaim
CreateServiceabilityPVC creates PersistentVolumeClaim for Serviceability
func CreateUnstructuredResourceFromSignature ¶
func CreateUnstructuredResourceFromSignature(leaderTrackerType string, assetsFolder *string, args ...string) (*unstructured.Unstructured, string, error)
func CreateUnstructuredResourceListFromSignature ¶
func CreateUnstructuredResourceListFromSignature(leaderTrackerType string, assetsFolder *string, args ...string) (*unstructured.UnstructuredList, string, error)
func CreateVolumeMount ¶
func CreateVolumeMount(mountPath string, fileName string) corev1.VolumeMount
func CustomizeEnvSSO ¶
func CustomizeEnvSSO(pts *corev1.PodTemplateSpec, instance *wlv1.WebSphereLibertyApplication, client client.Client, isOpenShift bool) error
CustomizeEnvSSO Process the configuration for SSO login providers
func CustomizeLTPAConfigJob ¶
func CustomizeLTPAConfigJob(job *v1.Job, jobRootName string, la *wlv1.WebSphereLibertyApplication, ltpaConfig *LTPAConfig, client client.Client)
func CustomizeLTPAKeysJob ¶
func CustomizeLTPAKeysJob(job *v1.Job, jobRootName string, la *wlv1.WebSphereLibertyApplication, ltpaConfig *LTPAConfig, client client.Client)
func CustomizeLTPAServerXML ¶
func CustomizeLeaderTracker ¶
func CustomizeLeaderTracker(leaderTracker *corev1.Secret, trackerList *[]LeaderTracker)
func CustomizeLibertyAnnotations ¶
func CustomizeLibertyAnnotations(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication)
func CustomizeLibertyEnv ¶
func CustomizeLibertyEnv(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication, client client.Client) error
CustomizeLibertyEnv adds configured env variables appending configured liberty settings
func CustomizeLicenseAnnotations ¶
func CustomizeLicenseAnnotations(pts *corev1.PodTemplateSpec, la *wlv1.WebSphereLibertyApplication)
func ExecuteCommandInContainer ¶
func ExecuteCommandInContainer(config *rest.Config, podName, podNamespace, containerName string, command []string) (string, error)
ExecuteCommandInContainer Execute command inside a container in a pod through API
func GetCommaSeparatedArray ¶
func GetCommaSeparatedString ¶
func GetLastRotationLabelKey ¶
func GetLeaderTracker ¶
func GetLeaderTracker(instance *wlv1.WebSphereLibertyApplication, operatorShortName string, leaderTrackerType string, client client.Client) (*corev1.Secret, *[]LeaderTracker, error)
func GetMaxTime ¶
func GetOperandVersionString ¶
Converts semantic version string "a.b.c" to format "va_b_c"
func GetTrackedResourceName ¶
func InsertIntoSortedLeaderTrackers ¶
func InsertIntoSortedLeaderTrackers(leaderTrackers *[]LeaderTracker, newLeader *LeaderTracker)
func IsLTPAJobConfigurationOutdated ¶
func IsLTPAJobConfigurationOutdated(job *v1.Job, appLeaderInstance *wlv1.WebSphereLibertyApplication, client client.Client) bool
Returns true if the WebSphereLibertyApplication leader's state has changed, causing existing LTPA Jobs to need a configuration update, otherwise return false
func IsOperandVersionString ¶
func IsValidOperandVersion ¶
func LocalObjectReferenceContainsName ¶
func LocalObjectReferenceContainsName(list []corev1.LocalObjectReference, name string) bool
func MountSecretAsVolume ¶
func MountSecretAsVolume(pts *corev1.PodTemplateSpec, secretName string, volumeMount corev1.VolumeMount)
func RegisterWithOidcProvider ¶
func RegisterWithOidcProvider(regData RegisterData) (string, string, error)
func RemoveLeaderTracker ¶
func RemoveLeaderTracker(leaderTracker *[]LeaderTracker, i int) bool
func RemoveMapElementByKey ¶
func RemovePodTemplateSpecAnnotationByKey ¶
func RemovePodTemplateSpecAnnotationByKey(pts *corev1.PodTemplateSpec, annotationKey string)
Types ¶
type LTPAConfig ¶
type LTPAConfig struct { Metadata *LTPAMetadata SecretName string SecretInstanceName string ConfigSecretName string ConfigSecretInstanceName string ServiceAccountName string JobRequestConfigMapName string ConfigMapName string FileName string EncryptionKeySecretName string EncryptionKeySharingEnabled bool // true or false }
type LTPAMetadata ¶
func (LTPAMetadata) GetAPIVersion ¶
func (m LTPAMetadata) GetAPIVersion() string
func (LTPAMetadata) GetKind ¶
func (m LTPAMetadata) GetKind() string
func (LTPAMetadata) GetName ¶
func (m LTPAMetadata) GetName() string
func (LTPAMetadata) GetPath ¶
func (m LTPAMetadata) GetPath() string
func (LTPAMetadata) GetPathIndex ¶
func (m LTPAMetadata) GetPathIndex() string
type LTPAMetadataList ¶
type LTPAMetadataList struct {
Items []LeaderTrackerMetadata
}
func (LTPAMetadataList) GetItems ¶
func (ml LTPAMetadataList) GetItems() []LeaderTrackerMetadata
type LeaderTracker ¶
func (*LeaderTracker) ClearOwnerIfMatching ¶
func (tracker *LeaderTracker) ClearOwnerIfMatching(instance string) bool
Clears the LeaderTracker owner if it matches instance, returning true if the LeaderTracker has changed and false otherwise
func (*LeaderTracker) ClearOwnerIfMatchingAndSharesLastPathParent ¶
func (tracker *LeaderTracker) ClearOwnerIfMatchingAndSharesLastPathParent(instance string, path string) bool
func (*LeaderTracker) EvictOwner ¶
func (tracker *LeaderTracker) EvictOwner() bool
Removes the Owner and Sublease attribute from LeaderTracker to indicate the resource is no longer being tracked
func (*LeaderTracker) EvictOwnerIfSubleaseHasExpired ¶
func (tracker *LeaderTracker) EvictOwnerIfSubleaseHasExpired() bool
func (*LeaderTracker) RenewSublease ¶
func (tracker *LeaderTracker) RenewSublease() bool
func (*LeaderTracker) SetOwner ¶
func (tracker *LeaderTracker) SetOwner(instance string) bool
type LeaderTrackerMetadata ¶
type LeaderTrackerMetadataList ¶
type LeaderTrackerMetadataList interface {
GetItems() []LeaderTrackerMetadata
}
type PasswordEncryptionMetadata ¶
type PasswordEncryptionMetadata struct { Kind string APIVersion string Name string Path string PathIndex string }
func (PasswordEncryptionMetadata) GetAPIVersion ¶
func (m PasswordEncryptionMetadata) GetAPIVersion() string
func (PasswordEncryptionMetadata) GetKind ¶
func (m PasswordEncryptionMetadata) GetKind() string
func (PasswordEncryptionMetadata) GetName ¶
func (m PasswordEncryptionMetadata) GetName() string
func (PasswordEncryptionMetadata) GetPath ¶
func (m PasswordEncryptionMetadata) GetPath() string
func (PasswordEncryptionMetadata) GetPathIndex ¶
func (m PasswordEncryptionMetadata) GetPathIndex() string
type PasswordEncryptionMetadataList ¶
type PasswordEncryptionMetadataList struct {
Items []LeaderTrackerMetadata
}
func (PasswordEncryptionMetadataList) GetItems ¶
func (ml PasswordEncryptionMetadataList) GetItems() []LeaderTrackerMetadata