Skip to content

Commit

Permalink
Add conditions to NodeUpgrader
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavmpandey08 committed Nov 19, 2023
1 parent 4aaea0e commit c3e7239
Show file tree
Hide file tree
Showing 7 changed files with 461 additions and 230 deletions.
50 changes: 5 additions & 45 deletions config/crd/bases/anywhere.eks.amazonaws.com_nodeupgrades.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,43 +36,6 @@ spec:
spec:
description: NodeUpgradeSpec defines the desired state of NodeUpgrade.
properties:
cluster:
description: Cluster is a reference to the CAPI Cluster that owns
this machine.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
coreDNSVersion:
type: string
etcdVersion:
Expand Down Expand Up @@ -119,7 +82,6 @@ spec:
type: string
type: object
required:
- cluster
- kubeletVersion
- kubernetesVersion
- machine
Expand All @@ -130,8 +92,6 @@ spec:
completed:
type: boolean
conditions:
description: Conditions provide observations of the operational state
of a Cluster API resource.
items:
description: Condition defines an observation of a Cluster API resource
operational state.
Expand Down Expand Up @@ -175,11 +135,11 @@ spec:
- type
type: object
type: array
phase:
type: string
required:
- completed
- phase
observedGeneration:
description: ObservedGeneration is the latest generation observed
by the controller.
format: int64
type: integer
type: object
type: object
served: true
Expand Down
60 changes: 15 additions & 45 deletions config/manifest/eksa-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4889,43 +4889,6 @@ spec:
spec:
description: NodeUpgradeSpec defines the desired state of NodeUpgrade.
properties:
cluster:
description: Cluster is a reference to the CAPI Cluster that owns
this machine.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
coreDNSVersion:
type: string
etcdVersion:
Expand Down Expand Up @@ -4972,7 +4935,6 @@ spec:
type: string
type: object
required:
- cluster
- kubeletVersion
- kubernetesVersion
- machine
Expand All @@ -4983,8 +4945,6 @@ spec:
completed:
type: boolean
conditions:
description: Conditions provide observations of the operational state
of a Cluster API resource.
items:
description: Condition defines an observation of a Cluster API resource
operational state.
Expand Down Expand Up @@ -5028,11 +4988,11 @@ spec:
- type
type: object
type: array
phase:
type: string
required:
- completed
- phase
observedGeneration:
description: ObservedGeneration is the latest generation observed
by the controller.
format: int64
type: integer
type: object
type: object
served: true
Expand Down Expand Up @@ -6958,6 +6918,16 @@ rules:
- list
- patch
- watch
- apiGroups:
- cluster.x-k8s.io
resources:
- machines
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- clusterctl.cluster.x-k8s.io
resources:
Expand Down
10 changes: 10 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@ rules:
- list
- patch
- watch
- apiGroups:
- cluster.x-k8s.io
resources:
- machines
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- clusterctl.cluster.x-k8s.io
resources:
Expand Down
Loading

0 comments on commit c3e7239

Please sign in to comment.