Skip to content

Commit 771e8a3

Browse files
authored
Merge pull request #538 from willie-yao/upstream-install-aso-crds
✨ Add support for customizing additional provider deployments
2 parents fbe3b5a + d1112d3 commit 771e8a3

15 files changed

+24435
-4809
lines changed

api/v1alpha1/provider_conversion.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func (src *BootstrapProvider) ConvertTo(dstRaw conversion.Hub) error {
4646
}
4747

4848
dst.Spec.ManifestPatches = restored.Spec.ManifestPatches
49+
dst.Spec.AdditionalDeployments = restored.Spec.AdditionalDeployments
4950

5051
return nil
5152
}
@@ -107,6 +108,7 @@ func (src *ControlPlaneProvider) ConvertTo(dstRaw conversion.Hub) error {
107108
}
108109

109110
dst.Spec.ManifestPatches = restored.Spec.ManifestPatches
111+
dst.Spec.AdditionalDeployments = restored.Spec.AdditionalDeployments
110112

111113
return nil
112114
}
@@ -168,6 +170,7 @@ func (src *CoreProvider) ConvertTo(dstRaw conversion.Hub) error {
168170
}
169171

170172
dst.Spec.ManifestPatches = restored.Spec.ManifestPatches
173+
dst.Spec.AdditionalDeployments = restored.Spec.AdditionalDeployments
171174

172175
return nil
173176
}
@@ -229,6 +232,7 @@ func (src *InfrastructureProvider) ConvertTo(dstRaw conversion.Hub) error {
229232
}
230233

231234
dst.Spec.ManifestPatches = restored.Spec.ManifestPatches
235+
dst.Spec.AdditionalDeployments = restored.Spec.AdditionalDeployments
232236

233237
return nil
234238
}

api/v1alpha1/zz_generated.conversion.go

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

api/v1alpha2/provider_types.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,24 @@ type ProviderSpec struct {
7373
// This should be an inline yaml blob-string https://datatracker.ietf.org/doc/html/rfc7396
7474
// +optional
7575
ManifestPatches []string `json:"manifestPatches,omitempty"`
76+
77+
// AdditionalDeployments is a map of additional deployments that the provider
78+
// should manage. The key is the name of the deployment and the value is the
79+
// DeploymentSpec.
80+
// +optional
81+
AdditionalDeployments map[string]AdditionalDeployments `json:"additionalDeployments,omitempty"`
82+
}
83+
84+
// AdditionalDeployments defines the properties that can be enabled on the controller
85+
// manager and deployment for the provider if the provider is managing additional deployments.
86+
type AdditionalDeployments struct {
87+
// Manager defines the properties that can be enabled on the controller manager for the additional provider deployment.
88+
// +optional
89+
Manager *ManagerSpec `json:"manager,omitempty"`
90+
91+
// Deployment defines the properties that can be enabled on the deployment for the additional provider deployment.
92+
// +optional
93+
Deployment *DeploymentSpec `json:"deployment,omitempty"`
7694
}
7795

7896
// ConfigmapReference contains enough information to locate the configmap.

api/v1alpha2/zz_generated.deepcopy.go

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

config/crd/bases/operator.cluster.x-k8s.io_addonproviders.yaml

Lines changed: 1393 additions & 0 deletions
Large diffs are not rendered by default.

config/crd/bases/operator.cluster.x-k8s.io_bootstrapproviders.yaml

Lines changed: 1393 additions & 0 deletions
Large diffs are not rendered by default.

config/crd/bases/operator.cluster.x-k8s.io_controlplaneproviders.yaml

Lines changed: 1393 additions & 0 deletions
Large diffs are not rendered by default.

config/crd/bases/operator.cluster.x-k8s.io_coreproviders.yaml

Lines changed: 1393 additions & 0 deletions
Large diffs are not rendered by default.

config/crd/bases/operator.cluster.x-k8s.io_infrastructureproviders.yaml

Lines changed: 1393 additions & 0 deletions
Large diffs are not rendered by default.

config/crd/bases/operator.cluster.x-k8s.io_ipamproviders.yaml

Lines changed: 1393 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)