Skip to content

Commit 5fbe651

Browse files
committed
adding generic patch field
Signed-off-by: Hemant Joshi <[email protected]>
1 parent 324c696 commit 5fbe651

17 files changed

+618
-81
lines changed

api/v1alpha2/provider_types.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,38 @@ type ProviderSpec struct {
8383
// +optional
8484
ManifestPatches []string `json:"manifestPatches,omitempty"`
8585

86+
// Patches are
87+
Patches []*Patch `json:"patches,omitempty"`
88+
8689
// AdditionalDeployments is a map of additional deployments that the provider
8790
// should manage. The key is the name of the deployment and the value is the
8891
// DeploymentSpec.
8992
// +optional
9093
AdditionalDeployments map[string]AdditionalDeployments `json:"additionalDeployments,omitempty"`
9194
}
9295

96+
type Patch struct {
97+
Patch string `json:"patch,omitempty"`
98+
Target *PatchSelector `json:"target,omitempty"`
99+
}
100+
101+
type PatchSelector struct {
102+
Group string `json:"group,omitempty"`
103+
104+
Version string `json:"version,omitempty"`
105+
106+
Kind string `json:"kind,omitempty"`
107+
108+
Name string `json:"name,omitempty"`
109+
110+
Namespace string `json:"namespace,omitempty"`
111+
112+
// LabelSelector is a string that follows the label selection expression
113+
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
114+
// +optional
115+
LabelSelector string `json:"labelSelector,omitempty"`
116+
}
117+
93118
// AdditionalDeployments defines the properties that can be enabled on the controller
94119
// manager and deployment for the provider if the provider is managing additional deployments.
95120
type AdditionalDeployments struct {

api/v1alpha2/zz_generated.deepcopy.go

Lines changed: 46 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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3041,6 +3041,32 @@ spec:
30413041
items:
30423042
type: string
30433043
type: array
3044+
patches:
3045+
description: Patches are
3046+
items:
3047+
properties:
3048+
patch:
3049+
type: string
3050+
target:
3051+
properties:
3052+
group:
3053+
type: string
3054+
kind:
3055+
type: string
3056+
labelSelector:
3057+
description: |-
3058+
LabelSelector is a string that follows the label selection expression
3059+
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3060+
type: string
3061+
name:
3062+
type: string
3063+
namespace:
3064+
type: string
3065+
version:
3066+
type: string
3067+
type: object
3068+
type: object
3069+
type: array
30443070
version:
30453071
description: Version indicates the provider version.
30463072
type: string

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3041,6 +3041,32 @@ spec:
30413041
items:
30423042
type: string
30433043
type: array
3044+
patches:
3045+
description: Patches are
3046+
items:
3047+
properties:
3048+
patch:
3049+
type: string
3050+
target:
3051+
properties:
3052+
group:
3053+
type: string
3054+
kind:
3055+
type: string
3056+
labelSelector:
3057+
description: |-
3058+
LabelSelector is a string that follows the label selection expression
3059+
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3060+
type: string
3061+
name:
3062+
type: string
3063+
namespace:
3064+
type: string
3065+
version:
3066+
type: string
3067+
type: object
3068+
type: object
3069+
type: array
30443070
version:
30453071
description: Version indicates the provider version.
30463072
type: string

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3042,6 +3042,32 @@ spec:
30423042
items:
30433043
type: string
30443044
type: array
3045+
patches:
3046+
description: Patches are
3047+
items:
3048+
properties:
3049+
patch:
3050+
type: string
3051+
target:
3052+
properties:
3053+
group:
3054+
type: string
3055+
kind:
3056+
type: string
3057+
labelSelector:
3058+
description: |-
3059+
LabelSelector is a string that follows the label selection expression
3060+
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3061+
type: string
3062+
name:
3063+
type: string
3064+
namespace:
3065+
type: string
3066+
version:
3067+
type: string
3068+
type: object
3069+
type: object
3070+
type: array
30453071
version:
30463072
description: Version indicates the provider version.
30473073
type: string

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3041,6 +3041,32 @@ spec:
30413041
items:
30423042
type: string
30433043
type: array
3044+
patches:
3045+
description: Patches are
3046+
items:
3047+
properties:
3048+
patch:
3049+
type: string
3050+
target:
3051+
properties:
3052+
group:
3053+
type: string
3054+
kind:
3055+
type: string
3056+
labelSelector:
3057+
description: |-
3058+
LabelSelector is a string that follows the label selection expression
3059+
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3060+
type: string
3061+
name:
3062+
type: string
3063+
namespace:
3064+
type: string
3065+
version:
3066+
type: string
3067+
type: object
3068+
type: object
3069+
type: array
30443070
version:
30453071
description: Version indicates the provider version.
30463072
type: string

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3042,6 +3042,32 @@ spec:
30423042
items:
30433043
type: string
30443044
type: array
3045+
patches:
3046+
description: Patches are
3047+
items:
3048+
properties:
3049+
patch:
3050+
type: string
3051+
target:
3052+
properties:
3053+
group:
3054+
type: string
3055+
kind:
3056+
type: string
3057+
labelSelector:
3058+
description: |-
3059+
LabelSelector is a string that follows the label selection expression
3060+
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3061+
type: string
3062+
name:
3063+
type: string
3064+
namespace:
3065+
type: string
3066+
version:
3067+
type: string
3068+
type: object
3069+
type: object
3070+
type: array
30453071
version:
30463072
description: Version indicates the provider version.
30473073
type: string

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3041,6 +3041,32 @@ spec:
30413041
items:
30423042
type: string
30433043
type: array
3044+
patches:
3045+
description: Patches are
3046+
items:
3047+
properties:
3048+
patch:
3049+
type: string
3050+
target:
3051+
properties:
3052+
group:
3053+
type: string
3054+
kind:
3055+
type: string
3056+
labelSelector:
3057+
description: |-
3058+
LabelSelector is a string that follows the label selection expression
3059+
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3060+
type: string
3061+
name:
3062+
type: string
3063+
namespace:
3064+
type: string
3065+
version:
3066+
type: string
3067+
type: object
3068+
type: object
3069+
type: array
30443070
version:
30453071
description: Version indicates the provider version.
30463072
type: string

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3043,6 +3043,32 @@ spec:
30433043
items:
30443044
type: string
30453045
type: array
3046+
patches:
3047+
description: Patches are
3048+
items:
3049+
properties:
3050+
patch:
3051+
type: string
3052+
target:
3053+
properties:
3054+
group:
3055+
type: string
3056+
kind:
3057+
type: string
3058+
labelSelector:
3059+
description: |-
3060+
LabelSelector is a string that follows the label selection expression
3061+
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
3062+
type: string
3063+
name:
3064+
type: string
3065+
namespace:
3066+
type: string
3067+
version:
3068+
type: string
3069+
type: object
3070+
type: object
3071+
type: array
30463072
version:
30473073
description: Version indicates the provider version.
30483074
type: string

0 commit comments

Comments
 (0)