Documentation
¶
Overview ¶
+kubebuilder:object:generate=true +groupName=dns.openmcp.cloud
Index ¶
Constants ¶
const ( OperationAnnotation = "dns." + openmcpconst.OperationAnnotation ExternalDNSFinalizerOnCluster = "platformservice." + openmcpconst.OpenMCPGroupName + "/dns" ReasonTargetClusterInteractionProblem = "TargetClusterInteractionProblem" )
const GroupName = "dns." + apiconst.OpenMCPGroupName
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type DNSServiceConfig ¶
type DNSServiceConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DNSServiceConfigSpec `json:"spec,omitempty"`
}
DNSServiceConfig is the Schema for the DNS PlatformService configuration API
func (*DNSServiceConfig) DeepCopy ¶
func (in *DNSServiceConfig) DeepCopy() *DNSServiceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSServiceConfig.
func (*DNSServiceConfig) DeepCopyInto ¶
func (in *DNSServiceConfig) DeepCopyInto(out *DNSServiceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DNSServiceConfig) DeepCopyObject ¶
func (in *DNSServiceConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DNSServiceConfigList ¶
type DNSServiceConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DNSServiceConfig `json:"items"`
}
DNSServiceConfigList contains a list of DNSServiceConfig
func (*DNSServiceConfigList) DeepCopy ¶
func (in *DNSServiceConfigList) DeepCopy() *DNSServiceConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSServiceConfigList.
func (*DNSServiceConfigList) DeepCopyInto ¶
func (in *DNSServiceConfigList) DeepCopyInto(out *DNSServiceConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DNSServiceConfigList) DeepCopyObject ¶
func (in *DNSServiceConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DNSServiceConfigSpec ¶
type DNSServiceConfigSpec struct {
// ExternalDNSSource is the source of the external-dns helm chart.
ExternalDNSSource ExternalDNSSource `json:"externalDNSSource"`
// SecretsToCopy specifies secrets that should be copied to either the cluster's namespace on the platform cluster,
// or the namespace on the target cluster where the helm chart will be installed into.
// +optional
SecretsToCopy *SecretsToCopy `json:"secretsToCopy,omitempty"`
// HelmReleaseReconciliationInterval is the interval at which the HelmRelease for external-dns is reconciled.
// The value can be overwritten for specific purposes using ExternalDNSForPurposes.
// If not set, a default of 1h is used.
// +optional
HelmReleaseReconciliationInterval *metav1.Duration `json:"helmReleaseReconciliationInterval,omitempty"`
// ExternalDNSForPurposes is a list of DNS configurations in combination with purpose selectors.
// The first matching purpose selector will be applied to the Cluster.
// If no selector matches, no configuration will be applied.
// +optional
ExternalDNSForPurposes []ExternalDNSPurposeConfig `json:"externalDNSForPurposes,omitempty"`
}
DNSServiceConfigSpec defines the desired state of DNSServiceConfig
func (*DNSServiceConfigSpec) DeepCopy ¶
func (in *DNSServiceConfigSpec) DeepCopy() *DNSServiceConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSServiceConfigSpec.
func (*DNSServiceConfigSpec) DeepCopyInto ¶
func (in *DNSServiceConfigSpec) DeepCopyInto(out *DNSServiceConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalDNSPurposeConfig ¶
type ExternalDNSPurposeConfig struct {
// Name is an optional name.
// It can be set to more easily identify the configuration in logs and events.
// +optional
Name string `json:"name,omitempty"`
// PurposeSelector is a selector to match against the list of purposes of a Cluster.
// If not set, all Clusters are matched.
// +optional
PurposeSelector *PurposeSelector `json:"purposeSelector,omitempty"`
// HelmReleaseReconciliationInterval is the interval at which the HelmRelease for external-dns is reconciled.
// If not set, the global HelmReleaseReconciliationInterval is used.
// +optional
HelmReleaseReconciliationInterval *metav1.Duration `json:"helmReleaseReconciliationInterval,omitempty"`
// HelmValues are the helm values to deploy external-dns with, if the purpose selector matches.
// There are a few special strings which will be replaced before creating the HelmRelease:
// - <provider.name> will be replaced with the provider name resource.
// - <provider.namespace> will be replaced with the namespace that hosts the platform service.
// - <environment> will be replaced with the environment name of the operator.
// - <cluster.name> will be replaced with the name of the reconciled Cluster.
// - <cluster.namespace> will be replaced with the namespace of the reconciled Cluster.
// +kubebuilder:validation:Type=object
// +kubebuilder:validation:Schemaless
// +kubebuilder:pruning:PreserveUnknownFields
HelmValues *apiextensionsv1.JSON `json:"helmValues"`
}
ExternalDNSPurposeConfig holds a purpose selector and the DNS configuration to apply if the selector matches.
func (*ExternalDNSPurposeConfig) DeepCopy ¶
func (in *ExternalDNSPurposeConfig) DeepCopy() *ExternalDNSPurposeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalDNSPurposeConfig.
func (*ExternalDNSPurposeConfig) DeepCopyInto ¶
func (in *ExternalDNSPurposeConfig) DeepCopyInto(out *ExternalDNSPurposeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalDNSSource ¶
type ExternalDNSSource struct {
// ChartName specifies the name of the external-dns chart.
// Can be omitted for oci sources, required for git and helm sources.
// For git sources, this is the path within the git repository to the chart.
// For helm sources, append the version to the chart name using '@', e.g. 'external-dns@1.10.0' or omit for latest version.
// +optional
ChartName string `json:"chartName"`
Helm *fluxv1.HelmRepositorySpec `json:"helm,omitempty"`
Git *fluxv1.GitRepositorySpec `json:"git,omitempty"`
OCI *fluxv1.OCIRepositorySpec `json:"oci,omitempty"`
}
ExternalDNSSource defines the source of the external-dns helm chart in form of a Flux source. Exactly one of 'HelmRepository', 'GitRepository' or 'OCIRepository' must be set. If 'copyAuthSecret' is set, the referenced source secret is copied into the namespace where the Flux resources are created with the specified target name. +kubebuilder:validation:ExactlyOneOf=helm;git;oci +kubebuilder:validation:XValidation:rule="(has(self.git) || has(self.helm)) ? (has(self.chartName) && size(self.chartName) > 0) : true", message="chartName must be set if git is used as source"
func (*ExternalDNSSource) DeepCopy ¶
func (in *ExternalDNSSource) DeepCopy() *ExternalDNSSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalDNSSource.
func (*ExternalDNSSource) DeepCopyInto ¶
func (in *ExternalDNSSource) DeepCopyInto(out *ExternalDNSSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PurposeSelector ¶
type PurposeSelector struct {
PurposeSelectorRequirement `json:",inline"`
}
PurposeSelector is a selector to match against the list of purposes of a Cluster.
func (*PurposeSelector) DeepCopy ¶
func (in *PurposeSelector) DeepCopy() *PurposeSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PurposeSelector.
func (*PurposeSelector) DeepCopyInto ¶
func (in *PurposeSelector) DeepCopyInto(out *PurposeSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PurposeSelector) Matches ¶
func (ps *PurposeSelector) Matches(purposes []string) bool
Matches returns true if the selector matches the given list of purposes.
type PurposeSelectorRequirement ¶
type PurposeSelectorRequirement struct {
// +kubebuilder:validation:items:Type=object
// +optional
And []PurposeSelectorRequirement `json:"and,omitempty"`
// +kubebuilder:validation:items:Type=object
// +optional
Or []PurposeSelectorRequirement `json:"or,omitempty"`
// +kubebuilder:validation:Type=object
// +optional
Not *PurposeSelectorRequirement `json:"not,omitempty"`
// +optional
Name string `json:"name,omitempty"`
}
PurposeSelectorRequirement is a selector to select purposes to apply the configuration to. The struct can be combined recursively using "and", "or" and "not" to build complex selectors. Exactly one of the fields must be set, otherwise only one of them is evaluated in the order: name, not, and, or. If name is set, the selector matches if the Cluster's purposes contain the given name. If and is set, the selector matches if all of the contained selectors match. If or is set, the selector matches if any of the contained selectors match. If not is set, the selector matches if the contained selector does not match.
func (*PurposeSelectorRequirement) DeepCopy ¶
func (in *PurposeSelectorRequirement) DeepCopy() *PurposeSelectorRequirement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PurposeSelectorRequirement.
func (*PurposeSelectorRequirement) DeepCopyInto ¶
func (in *PurposeSelectorRequirement) DeepCopyInto(out *PurposeSelectorRequirement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretCopy ¶
type SecretCopy struct {
// Source references the source secret to copy.
// It has to be in the namespace the provider pod is running in.
Source commonapi.LocalObjectReference `json:"source"`
// Target is the name of the copied secret.
// If not set, the secret will be copied with the same name as the source secret.
// +optional
Target *commonapi.LocalObjectReference `json:"target"`
}
SecretCopy defines the name of the secret to copy and the name of the copied secret. If target is nil or target.name is empty, the secret will be copied with the same name as the source secret.
func (*SecretCopy) DeepCopy ¶
func (in *SecretCopy) DeepCopy() *SecretCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretCopy.
func (*SecretCopy) DeepCopyInto ¶
func (in *SecretCopy) DeepCopyInto(out *SecretCopy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretsToCopy ¶ added in v0.0.2
type SecretsToCopy struct {
// ToPlatformCluster lists secrets from the provider namespace that should be copied into the cluster's namespace on the platform cluster.
// This is useful e.g. for pull secrets for the helm chart registry.
// +optional
ToPlatformCluster []SecretCopy `json:"toPlatformCluster,omitempty"`
// ToTargetCluster lists secrets from the provider namespace that should be copied into the cluster's namespace on the target cluster.
// This allows propagating secrets that are required by the helm chart to the target cluster.
// +optional
ToTargetCluster []SecretCopy `json:"toTargetCluster,omitempty"`
}
func (*SecretsToCopy) DeepCopy ¶ added in v0.0.2
func (in *SecretsToCopy) DeepCopy() *SecretsToCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretsToCopy.
func (*SecretsToCopy) DeepCopyInto ¶ added in v0.0.2
func (in *SecretsToCopy) DeepCopyInto(out *SecretsToCopy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.