Skip to content

Commit a17b14e

Browse files
committed
feat: add registryMirror API
1 parent 733f3a6 commit a17b14e

6 files changed

+70
-0
lines changed

api/v1alpha1/addon_types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const (
2727

2828
ServiceLoadBalancerProviderMetalLB = "MetalLB"
2929

30+
RegistryMirrorProviderDistribution = "Distribution"
31+
3032
AddonStrategyClusterResourceSet AddonStrategy = "ClusterResourceSet"
3133
AddonStrategyHelmAddon AddonStrategy = "HelmAddon"
3234

@@ -100,6 +102,9 @@ type GenericAddons struct {
100102

101103
// +kubebuilder:validation:Optional
102104
ServiceLoadBalancer *ServiceLoadBalancer `json:"serviceLoadBalancer,omitempty"`
105+
106+
// +kubebuilder:validation:Optional
107+
RegistryMirror *RegistryMirror `json:"registryMirror,omitempty"`
103108
}
104109

105110
type AddonStrategy string
@@ -335,3 +340,10 @@ type AddressRange struct {
335340
// +kubebuilder:validation:Format=ipv4
336341
End string `json:"end"`
337342
}
343+
344+
type RegistryMirror struct {
345+
// The OCI registry provider to deploy.
346+
// +kubebuilder:default=Distribution
347+
// +kubebuilder:validation:Enum=Distribution
348+
Provider string `json:"provider"`
349+
}

api/v1alpha1/constants.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const (
2828
ClusterAutoscalerVariableName = "clusterAutoscaler"
2929
// ServiceLoadBalancerVariableName is the Service LoadBalancer config patch variable name.
3030
ServiceLoadBalancerVariableName = "serviceLoadBalancer"
31+
// RegistryMirrorVariableName is the OCI registry config patch variable name.
32+
RegistryMirrorVariableName = "registryMirror"
3133

3234
// GlobalMirrorVariableName is the global image registry mirror patch variable name.
3335
GlobalMirrorVariableName = "globalImageRegistryMirror"
@@ -38,4 +40,7 @@ const (
3840
DNSVariableName = "dns"
3941

4042
ClusterUUIDAnnotationKey = APIGroup + "/cluster-uuid"
43+
44+
// DefaultServicesSubnet defines default service subnet range used by kubeadm in CAPI
45+
DefaultServicesSubnet = "10.96.0.0/12"
4146
)

api/v1alpha1/crds/caren.nutanix.com_awsclusterconfigs.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,17 @@ spec:
234234
- HelmAddon
235235
type: string
236236
type: object
237+
registryMirror:
238+
properties:
239+
provider:
240+
default: Distribution
241+
description: The OCI registry provider to deploy.
242+
enum:
243+
- Distribution
244+
type: string
245+
required:
246+
- provider
247+
type: object
237248
serviceLoadBalancer:
238249
properties:
239250
configuration:

api/v1alpha1/crds/caren.nutanix.com_dockerclusterconfigs.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,17 @@ spec:
243243
- HelmAddon
244244
type: string
245245
type: object
246+
registryMirror:
247+
properties:
248+
provider:
249+
default: Distribution
250+
description: The OCI registry provider to deploy.
251+
enum:
252+
- Distribution
253+
type: string
254+
required:
255+
- provider
256+
type: object
246257
serviceLoadBalancer:
247258
properties:
248259
configuration:

api/v1alpha1/crds/caren.nutanix.com_nutanixclusterconfigs.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,17 @@ spec:
243243
- HelmAddon
244244
type: string
245245
type: object
246+
registryMirror:
247+
properties:
248+
provider:
249+
default: Distribution
250+
description: The OCI registry provider to deploy.
251+
enum:
252+
- Distribution
253+
type: string
254+
required:
255+
- provider
256+
type: object
246257
serviceLoadBalancer:
247258
properties:
248259
configuration:

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)