update policy api group name in scripts

Signed-off-by: Kevin Wang <kevinwzf0126@gmail.com>
This commit is contained in:
Kevin Wang 2021-01-25 10:45:24 +08:00 committed by Hongcai Ren
parent 203d52ac92
commit 3a905855ca
12 changed files with 1015 additions and 27 deletions

View File

@ -0,0 +1,253 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: overridepolicies.policy.karmada.io
spec:
group: policy.karmada.io
names:
kind: OverridePolicy
listKind: OverridePolicyList
plural: overridepolicies
singular: overridepolicy
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: OverridePolicy represents the policy that overrides a group of
resources to one or more clusters.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Spec represents the desired behavior of OverridePolicy.
properties:
overriders:
description: Overriders represents the override rules that would apply
on resources
properties:
plaintext:
description: Plaintext represents override rules defined with
plaintext overriders.
items:
description: PlaintextOverrider is a simple overrider that overrides
target fields according to path, operator and value.
properties:
operator:
description: 'Operator indicates the operation on target
field. Available operators are: add, update and remove.'
enum:
- add
- remove
- replace
type: string
path:
description: Path indicates the path of target field
type: string
value:
description: Value to be applied to target field. Must be
empty when operator is Remove.
x-kubernetes-preserve-unknown-fields: true
required:
- operator
- path
type: object
type: array
type: object
resourceSelectors:
description: ResourceSelectors restricts resource types that this
override policy applies to.
items:
description: ResourceSelector the resources will be selected.
properties:
apiVersion:
description: APIVersion represents the API version of the target
resources.
type: string
kind:
description: Kind represents the Kind of the target resources.
type: string
labelSelector:
description: A label query over a set of resources. If name
is not empty, labelSelector will be ignored.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values array
must be non-empty. If the operator is Exists or
DoesNotExist, the values array must be empty. This
array is replaced during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is
"key", the operator is "In", and the values array contains
only "value". The requirements are ANDed.
type: object
type: object
name:
description: Name of the target resource. Default is empty,
which means selecting all resources.
type: string
namespace:
description: Namespace of the target resource. Default is empty,
which means inherit from the parent object scope.
type: string
required:
- apiVersion
- kind
type: object
type: array
targetCluster:
description: TargetCluster defines restrictions on this override policy
that only applies to resources propagated to the matching clusters
properties:
clusterNames:
description: ClusterNames is the list of clusters to be selected.
items:
type: string
type: array
exclude:
description: ExcludedClusters is the list of clusters to be ignored.
items:
type: string
type: array
fieldSelector:
description: FieldSelector is a filter to select member clusters
by fields. If non-nil and non-empty, only the clusters match
this filter will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
items:
description: A node selector requirement is a selector that
contains values, a key, and an operator that relates the
key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: Represents a key's relationship to a set
of values. Valid operators are In, NotIn, Exists,
DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the operator
is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. If the operator is Gt or Lt,
the values array must have a single element, which
will be interpreted as an integer. This array is replaced
during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
type: object
labelSelector:
description: LabelSelector is a filter to select member clusters
by labels. If non-nil and non-empty, only the clusters match
this filter will be selected.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If
the operator is In or NotIn, the values array must
be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced
during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A
single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is "key",
the operator is "In", and the values array contains only
"value". The requirements are ANDed.
type: object
type: object
type: object
type: object
required:
- spec
type: object
served: true
storage: true
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,228 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: propagationbindings.policy.karmada.io
spec:
group: policy.karmada.io
names:
kind: PropagationBinding
listKind: PropagationBindingList
plural: propagationbindings
singular: propagationbinding
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: PropagationBinding represents a binding of a kubernetes resource
with a propagation policy.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Spec represents the desired behavior.
properties:
clusters:
description: Clusters represents target member clusters where the
resource to be deployed.
items:
description: TargetCluster represents the identifier of a member
cluster.
properties:
name:
description: Name of target cluster.
type: string
required:
- name
type: object
type: array
resource:
description: Resource represents the Kubernetes resource to be propagated.
properties:
apiVersion:
description: APIVersion represents the API version of the referent.
type: string
kind:
description: Kind represents the Kind of the referent.
type: string
name:
description: Name represents the name of the referent.
type: string
namespace:
description: Namespace represents the namespace for the referent.
For non-namespace scoped resources(e.g. 'ClusterRole')do not
need specify Namespace, and for namespace scoped resources,
Namespace is required. If Namespace is not specified, means
the resource is non-namespace scoped.
type: string
resourceVersion:
description: ResourceVersion represents the internal version of
the referenced object, that can be used by clients to determine
when object has changed.
type: string
required:
- apiVersion
- kind
- name
type: object
required:
- resource
type: object
status:
description: Status represents the most recently observed status of the
PropagationBinding.
properties:
aggregatedStatus:
description: AggregatedStatus represents status list of the resource
running in each member cluster.
items:
description: AggregatedStatusItem represents status of the resource
running in a member cluster.
properties:
clusterName:
description: ClusterName represents the member cluster name
which the resource deployed on.
type: string
resourceStatus:
description: ResourceStatus represents the status of the resource.
properties:
deploymentStatus:
description: Deployment represents the deployment status
in the member cluster, only available when the resource
kind is Deployment.
properties:
availableReplicas:
description: Total number of available pods (ready for
at least minReadySeconds) targeted by this deployment.
format: int32
type: integer
readyReplicas:
description: Total number of ready pods targeted by
this deployment.
format: int32
type: integer
replicas:
description: Total number of non-terminated pods targeted
by this deployment (their labels match the selector).
format: int32
type: integer
unavailableReplicas:
description: Total number of unavailable pods targeted
by this deployment. This is the total number of pods
that are still required for the deployment to have
100% available capacity. They may either be pods that
are running but not yet available or pods that still
have not been created.
format: int32
type: integer
updatedReplicas:
description: Total number of non-terminated pods targeted
by this deployment that have the desired template
spec.
format: int32
type: integer
type: object
type: object
required:
- clusterName
type: object
type: array
conditions:
description: Conditions contain the different condition statuses.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are:
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
\n // other fields }"
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be when
the underlying condition changed. If that is not known, then
using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if .metadata.generation
is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values and
meanings for this field, and whether the values are considered
a guaranteed API. The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be useful
(see .node.status.conditions), the ability to deconflict is
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,312 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: propagationpolicies.policy.karmada.io
spec:
group: policy.karmada.io
names:
kind: PropagationPolicy
listKind: PropagationPolicyList
plural: propagationpolicies
singular: propagationpolicy
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: PropagationPolicy represents the policy that propagates a group
of resources to one or more clusters.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Spec represents the desired behavior of PropagationPolicy.
properties:
association:
description: Association tells if relevant resources should be selected
automatically. e.g. a ConfigMap referred by a Deployment. default
false.
type: boolean
placement:
description: Placement represents the rule for select clusters to
propagate resources.
properties:
clusterAffinity:
description: ClusterAffinity represents scheduling restrictions
to a certain set of clusters. If not set, any cluster can be
scheduling candidate.
properties:
clusterNames:
description: ClusterNames is the list of clusters to be selected.
items:
type: string
type: array
exclude:
description: ExcludedClusters is the list of clusters to be
ignored.
items:
type: string
type: array
fieldSelector:
description: FieldSelector is a filter to select member clusters
by fields. If non-nil and non-empty, only the clusters match
this filter will be selected.
properties:
matchExpressions:
description: A list of field selector requirements.
items:
description: A node selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: Represents a key's relationship to
a set of values. Valid operators are In, NotIn,
Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the operator
is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the
values array must be empty. If the operator is
Gt or Lt, the values array must have a single
element, which will be interpreted as an integer.
This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
type: object
labelSelector:
description: LabelSelector is a filter to select member clusters
by labels. If non-nil and non-empty, only the clusters match
this filter will be selected.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values array
must be non-empty. If the operator is Exists or
DoesNotExist, the values array must be empty.
This array is replaced during a strategic merge
patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is
"key", the operator is "In", and the values array contains
only "value". The requirements are ANDed.
type: object
type: object
type: object
clusterTolerations:
description: ClusterTolerations represents the tolerations.
items:
description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using
the matching operator <operator>.
properties:
effect:
description: Effect indicates the taint effect to match.
Empty means match all taint effects. When specified, allowed
values are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: Key is the taint key that the toleration applies
to. Empty means match all taint keys. If the key is empty,
operator must be Exists; this combination means to match
all values and all keys.
type: string
operator:
description: Operator represents a key's relationship to
the value. Valid operators are Exists and Equal. Defaults
to Equal. Exists is equivalent to wildcard for value,
so that a pod can tolerate all taints of a particular
category.
type: string
tolerationSeconds:
description: TolerationSeconds represents the period of
time the toleration (which must be of effect NoExecute,
otherwise this field is ignored) tolerates the taint.
By default, it is not set, which means tolerate the taint
forever (do not evict). Zero and negative values will
be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: Value is the taint value the toleration matches
to. If the operator is Exists, the value should be empty,
otherwise just a regular string.
type: string
type: object
type: array
spreadConstraints:
description: SpreadConstraints represents a list of the scheduling
constraints.
items:
description: SpreadConstraint represents the spread constraints
on resources.
properties:
maximum:
description: Maximum restricts the maximum number of cluster
units to be selected.
type: integer
minimum:
description: Minimum restricts the minimum number of cluster
units to be selected.
type: integer
spreadByField:
description: 'SpreadByField represents the field used for
grouping member clusters into units. Resources will be
spread among different cluster units. Available field
for spreading are: region, zone, cluster and provider.'
type: string
spreadByLabel:
description: SpreadByLabel represents the label key used
for grouping member clusters into units. Resources will
be spread among different cluster units.
type: string
type: object
type: array
type: object
resourceSelectors:
description: ResourceSelectors used to select resources. nil represents
all resources.
items:
description: ResourceSelector the resources will be selected.
properties:
apiVersion:
description: APIVersion represents the API version of the target
resources.
type: string
kind:
description: Kind represents the Kind of the target resources.
type: string
labelSelector:
description: A label query over a set of resources. If name
is not empty, labelSelector will be ignored.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values array
must be non-empty. If the operator is Exists or
DoesNotExist, the values array must be empty. This
array is replaced during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is
"key", the operator is "In", and the values array contains
only "value". The requirements are ANDed.
type: object
type: object
name:
description: Name of the target resource. Default is empty,
which means selecting all resources.
type: string
namespace:
description: Namespace of the target resource. Default is empty,
which means inherit from the parent object scope.
type: string
required:
- apiVersion
- kind
type: object
type: array
schedulerName:
description: SchedulerName represents which scheduler to proceed the
scheduling. If specified, the policy will be dispatched by specified
scheduler. If not specified, the policy will be dispatched by default
scheduler.
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,195 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: propagationworks.policy.karmada.io
spec:
group: policy.karmada.io
names:
kind: PropagationWork
listKind: PropagationWorkList
plural: propagationworks
singular: propagationwork
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: PropagationWork defines a list of resources to be deployed on
the member cluster.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: Spec represents the desired behavior of PropagationWork.
properties:
workload:
description: Workload represents the manifest workload to be deployed
on managed cluster.
properties:
manifests:
description: Manifests represents a list of Kubernetes resources
to be deployed on the managed cluster.
items:
description: Manifest represents a resource to be deployed on
managed cluster.
type: object
x-kubernetes-preserve-unknown-fields: true
type: array
type: object
type: object
status:
description: Status represents the status of PropagationStatus.
properties:
conditions:
description: 'Conditions contain the different condition statuses
for this work. Valid condition types are: 1. Applied represents
workload in PropagationWork is applied successfully on a managed
cluster. 2. Progressing represents workload in PropagationWork is
being applied on a managed cluster. 3. Available represents workload
in PropagationWork exists on the managed cluster. 4. Degraded represents
the current state of workload does not match the desired state for
a certain period.'
items:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are:
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
\n // other fields }"
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be when
the underlying condition changed. If that is not known, then
using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if .metadata.generation
is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values and
meanings for this field, and whether the values are considered
a guaranteed API. The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be useful
(see .node.status.conditions), the ability to deconflict is
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
manifestStatuses:
description: ManifestStatuses contains running status of manifests
in spec.
items:
description: ManifestStatus contains running status of a specific
manifest in spec.
properties:
identifier:
description: Identifier represents the identity of a resource
linking to manifests in spec.
properties:
group:
description: Group is the group of the resource.
type: string
kind:
description: Kind is the kind of the resource.
type: string
name:
description: Name is the name of the resource
type: string
namespace:
description: Namespace is the namespace of the resource,
the resource is cluster scoped if the value is empty
type: string
ordinal:
description: Ordinal represents an index in manifests list,
so the condition can still be linked to a manifest even
though manifest cannot be parsed successfully.
type: integer
resource:
description: Resource is the resource type of the resource
type: string
version:
description: Version is the version of the resource.
type: string
required:
- kind
- name
- ordinal
- resource
- version
type: object
required:
- identifier
type: object
x-kubernetes-preserve-unknown-fields: true
type: array
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -8,7 +8,7 @@ webhooks:
- name: overridepolicy.karmada.io
rules:
- operations: ["CREATE", "UPDATE"]
apiGroups: ["propagationstrategy.karmada.io"]
apiGroups: ["policy.karmada.io"]
apiVersions: ["*"]
resources: ["overridepolicies"]
scope: "Namespaced"

View File

@ -1,13 +1,13 @@
apiVersion: propagationstrategy.karmada.io/v1alpha1
kind: PropagationBinding
metadata:
name: binding-foo
spec:
resource:
apiVersion: apps/v1
kind: Deployment
name: nginx
namespace: default
clusters:
- name: cluster1
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationBinding
metadata:
name: binding-foo
spec:
resource:
apiVersion: apps/v1
kind: Deployment
name: nginx
namespace: default
clusters:
- name: cluster1
- name: cluster3

View File

@ -1,4 +1,4 @@
apiVersion: propagationstrategy.karmada.io/v1alpha1
apiVersion: policy.karmada.io/v1alpha1
kind: OverridePolicy
metadata:
name: example-override

View File

@ -1,4 +1,4 @@
apiVersion: propagationstrategy.karmada.io/v1alpha1
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: example-policy

View File

@ -1,4 +1,4 @@
apiVersion: propagationstrategy.karmada.io/v1alpha1
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: example-policy

View File

@ -67,10 +67,10 @@ function installCRDs() {
# install APIs
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/namespace.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/cluster.karmada.io_clusters.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/propagationstrategy.karmada.io_propagationpolicies.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/propagationstrategy.karmada.io_propagationbindings.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/propagationstrategy.karmada.io_propagationworks.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/propagationstrategy.karmada.io_overridepolicies.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/policy.karmada.io_propagationpolicies.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/policy.karmada.io_propagationbindings.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/policy.karmada.io_propagationworks.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/policy.karmada.io_overridepolicies.yaml"
}
#generate cert

View File

@ -74,10 +74,10 @@ function installCRDs() {
# install APIs
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/namespace.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/cluster.karmada.io_clusters.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/propagationstrategy.karmada.io_propagationpolicies.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/propagationstrategy.karmada.io_propagationbindings.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/propagationstrategy.karmada.io_propagationworks.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/propagationstrategy.karmada.io_overridepolicies.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/policy.karmada.io_propagationpolicies.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/policy.karmada.io_propagationbindings.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/policy.karmada.io_propagationworks.yaml"
kubectl apply -f "${REPO_ROOT}/artifacts/deploy/policy.karmada.io_overridepolicies.yaml"
}

View File

@ -9,7 +9,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-
bash "${CODEGEN_PKG}"/generate-groups.sh "deepcopy,client,informer,lister" \
github.com/karmada-io/karmada/pkg/generated github.com/karmada-io/karmada/pkg/apis \
"propagationstrategy:v1alpha1 cluster:v1alpha1" \
"policy:v1alpha1 cluster:v1alpha1" \
--output-base "$(dirname "${BASH_SOURCE[0]}")/../../../.." \
--go-header-file "${SCRIPT_ROOT}"/hack/boilerplate/boilerplate.go.txt
@ -21,5 +21,5 @@ register-gen \
--output-package=github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1
register-gen \
--go-header-file hack/boilerplate/boilerplate.go.txt \
--input-dirs=github.com/karmada-io/karmada/pkg/apis/propagationstrategy/v1alpha1 \
--output-package=github.com/karmada-io/karmada/pkg/apis/propagationstrategy/v1alpha1
--input-dirs=github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1 \
--output-package=github.com/karmada-io/karmada/pkg/apis/policy/v1alpha1