/
types.go
65 lines (55 loc) · 2.52 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// DNSConfig configuration resource
type DNSConfig struct {
metav1.TypeMeta `json:",inline"`
// DNSProviderReplication contains enablement for replication of DNSProviders from shoot cluster to control plane
// +optional
DNSProviderReplication *DNSProviderReplication `json:"dnsProviderReplication,omitempty"`
// Providers is a list of additional DNS providers that shall be enabled for this shoot cluster.
// The primary ("external") provider at `spec.dns.provider` is added automatically
// +optional
Providers []DNSProvider `json:"providers,omitempty"`
// SyncProvidersFromShootSpecDNS is an optional flag for migrating and synchronising the providers given in the
// shoot manifest at section `spec.dns.providers`. If true, any direct changes on the `providers` section
// are overwritten with the content of section `spec.dns.providers`.
// +optional
SyncProvidersFromShootSpecDNS *bool `json:"syncProvidersFromShootSpecDNS,omitempty"`
}
// DNSProviderReplication contains enablement for replication of DNSProviders from shoot cluster to control plane
type DNSProviderReplication struct {
// Enabled if true, the replication of DNSProviders from shoot cluster to the control plane is enabled
Enabled bool `json:"enabled"`
}
// DNSProvider contains information about a DNS provider.
type DNSProvider struct {
// Domains contains information about which domains shall be included/excluded for this provider.
// +optional
Domains *DNSIncludeExclude `json:"domains,omitempty"`
// SecretName is a name of a secret containing credentials for the stated domain and the
// provider.
// +optional
SecretName *string `json:"secretName,omitempty"`
// Type is the DNS provider type.
// +optional
Type *string `json:"type,omitempty"`
// Zones contains information about which hosted zones shall be included/excluded for this provider.
// +optional
Zones *DNSIncludeExclude `json:"zones,omitempty"`
}
// DNSIncludeExclude contains information about which domains shall be included/excluded.
type DNSIncludeExclude struct {
// Include is a list of domains that shall be included.
// +optional
Include []string `json:"include,omitempty"`
// Exclude is a list of domains that shall be excluded.
// +optional
Exclude []string `json:"exclude,omitempty"`
}