Skip to content

Commit 69d1b84

Browse files
authored
Added OpenShift Node Upgrade Mutex Operator (redhat-openshift-ecosystem#5123)
Signed-off-by: Jason Skrzypek <[email protected]>
1 parent e8666cb commit 69d1b84

9 files changed

+1291
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
creationTimestamp: null
5+
labels:
6+
app.kubernetes.io/component: kube-rbac-proxy
7+
app.kubernetes.io/created-by: openshift-node-upgrade-mutex-operator
8+
app.kubernetes.io/instance: metrics-reader
9+
app.kubernetes.io/managed-by: kustomize
10+
app.kubernetes.io/name: clusterrole
11+
app.kubernetes.io/part-of: openshift-node-upgrade-mutex-operator
12+
name: openshift-node-upgrade-mutex-operator-metrics-reader
13+
rules:
14+
- nonResourceURLs:
15+
- /metrics
16+
verbs:
17+
- get
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
creationTimestamp: null
5+
labels:
6+
app.kubernetes.io/component: kube-rbac-proxy
7+
app.kubernetes.io/created-by: openshift-node-upgrade-mutex-operator
8+
app.kubernetes.io/instance: controller-manager-metrics-service
9+
app.kubernetes.io/managed-by: kustomize
10+
app.kubernetes.io/name: service
11+
app.kubernetes.io/part-of: openshift-node-upgrade-mutex-operator
12+
control-plane: controller-manager
13+
name: openshift-node-upgrade-mutex-operator-service
14+
spec:
15+
ports:
16+
- name: https
17+
port: 8443
18+
protocol: TCP
19+
targetPort: https
20+
selector:
21+
control-plane: controller-manager
22+
status:
23+
loadBalancer: {}

operators/openshift-node-upgrade-mutex-operator/0.1.22/manifests/openshift-node-upgrade-mutex-operator.clusterserviceversion.yaml

Lines changed: 863 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
creationTimestamp: null
5+
name: mutexrules.openshift-optional.skrzypek.io
6+
spec:
7+
group: openshift-optional.skrzypek.io
8+
names:
9+
categories:
10+
- numo
11+
kind: MutexRule
12+
listKind: MutexRuleList
13+
plural: mutexrules
14+
singular: mutexrule
15+
scope: Namespaced
16+
versions:
17+
- additionalPrinterColumns:
18+
- description: Generated Job Name Prefix
19+
jsonPath: .spec.jobName
20+
name: Job Name
21+
type: string
22+
- description: Generated Job Namespace
23+
jsonPath: .spec.jobNamespace
24+
name: Job Namespace
25+
type: string
26+
name: v1alpha1
27+
schema:
28+
openAPIV3Schema:
29+
description: MutexRule is the Schema for the mutexrules API
30+
properties:
31+
apiVersion:
32+
description: 'APIVersion defines the versioned schema of this representation
33+
of an object. Servers should convert recognized schemas to the latest
34+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
35+
type: string
36+
kind:
37+
description: 'Kind is a string value representing the REST resource this
38+
object represents. Servers may infer this from the endpoint the client
39+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
40+
type: string
41+
metadata:
42+
type: object
43+
spec:
44+
description: Spec defines the desired state of MutexRule
45+
properties:
46+
jobName:
47+
description: |
48+
The prefix used for jobs generated by this configuration. A 'jobName' of "testjob" will generate jobs similar to "testjob-e7va7".
49+
type: string
50+
jobNamespace:
51+
description: |
52+
The namespace that will contain all of the jobs generated by this configuration. **This field does not create the appropriate RBAC**
53+
type: string
54+
jobSpec:
55+
description: |
56+
Schema available here: 'https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spec/v3/apis__batch__v1_openapi.json#L320'
57+
type: object
58+
x-kubernetes-preserve-unknown-fields: true
59+
type:
60+
description: |
61+
This field allows for future resource rule types. Currently it only supports 'kubernetes'
62+
enum:
63+
- kubernetes
64+
type: string
65+
type: object
66+
status:
67+
description: Status defines the observed state of MutexRule
68+
properties:
69+
conditions:
70+
items:
71+
properties:
72+
lastTransitionTime:
73+
type: string
74+
message:
75+
type: string
76+
reason:
77+
type: string
78+
status:
79+
type: string
80+
type:
81+
type: string
82+
type: object
83+
type: array
84+
type: object
85+
type: object
86+
served: true
87+
storage: true
88+
subresources:
89+
status: {}
90+
status:
91+
acceptedNames:
92+
kind: ""
93+
plural: ""
94+
conditions: null
95+
storedVersions: null
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
creationTimestamp: null
5+
name: mutexrunconfigs.openshift-optional.skrzypek.io
6+
spec:
7+
group: openshift-optional.skrzypek.io
8+
names:
9+
categories:
10+
- numo
11+
kind: MutexRunConfig
12+
listKind: MutexRunConfigList
13+
plural: mutexrunconfigs
14+
singular: mutexrunconfig
15+
scope: Namespaced
16+
versions:
17+
- additionalPrinterColumns:
18+
- description: Name of Canary Machine Config Pool
19+
jsonPath: .spec.canary.name
20+
name: Canary
21+
type: string
22+
- description: List of Mutex Rules
23+
jsonPath: .spec.mutexRules
24+
name: Rules
25+
type: string
26+
- description: List of Mutex Targets
27+
jsonPath: .spec.mutexTargets
28+
name: Targets
29+
type: string
30+
name: v1alpha1
31+
schema:
32+
openAPIV3Schema:
33+
description: MutexRunConfig is the Schema for the mutexrunconfigs API
34+
properties:
35+
apiVersion:
36+
description: 'APIVersion defines the versioned schema of this representation
37+
of an object. Servers should convert recognized schemas to the latest
38+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
39+
type: string
40+
kind:
41+
description: 'Kind is a string value representing the REST resource this
42+
object represents. Servers may infer this from the endpoint the client
43+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
44+
type: string
45+
metadata:
46+
type: object
47+
spec:
48+
description: Spec defines the desired state of MutexRunConfig
49+
properties:
50+
canary:
51+
description: Information pertaining to the **existing** machineConfigPool
52+
in which upgrades can occur
53+
properties:
54+
name:
55+
description: Name of an existing machineConfigPool not included
56+
in any mutexTargets
57+
type: string
58+
type: object
59+
mutexRules:
60+
description: Information pertaining to the **existing** mutexRules
61+
items:
62+
properties:
63+
name:
64+
description: Name of an existing mutexRule resource
65+
type: string
66+
namespace:
67+
description: Namespace of an existing mutexRule resource
68+
type: string
69+
type: object
70+
type: array
71+
mutexTargets:
72+
description: Information pertaining to the **existing** mutexTargets
73+
items:
74+
properties:
75+
name:
76+
description: Name of an existing mutexRule resource
77+
type: string
78+
namespace:
79+
description: Namespace of an existing mutexTarget resource
80+
type: string
81+
type: object
82+
type: array
83+
type: object
84+
status:
85+
description: Status defines the observed state of MutexRule
86+
properties:
87+
conditions:
88+
items:
89+
properties:
90+
lastTransitionTime:
91+
type: string
92+
message:
93+
type: string
94+
reason:
95+
type: string
96+
status:
97+
type: string
98+
type:
99+
type: string
100+
type: object
101+
type: array
102+
type: object
103+
type: object
104+
served: true
105+
storage: true
106+
subresources:
107+
status: {}
108+
status:
109+
acceptedNames:
110+
kind: ""
111+
plural: ""
112+
conditions: null
113+
storedVersions: null
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
creationTimestamp: null
5+
name: mutextargets.openshift-optional.skrzypek.io
6+
spec:
7+
group: openshift-optional.skrzypek.io
8+
names:
9+
categories:
10+
- numo
11+
kind: MutexTarget
12+
listKind: MutexTargetList
13+
plural: mutextargets
14+
singular: mutextarget
15+
scope: Namespaced
16+
versions:
17+
- additionalPrinterColumns:
18+
- description: List of target Machine Config Pools
19+
jsonPath: .spec.machineConfigPools
20+
name: Machine Config Pools
21+
type: string
22+
- description: List of target Nodes
23+
jsonPath: .status.nodes
24+
name: Nodes
25+
type: string
26+
name: v1alpha1
27+
schema:
28+
openAPIV3Schema:
29+
description: MutexTarget is the Schema for the mutextargets API
30+
properties:
31+
apiVersion:
32+
description: 'APIVersion defines the versioned schema of this representation
33+
of an object. Servers should convert recognized schemas to the latest
34+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
35+
type: string
36+
kind:
37+
description: 'Kind is a string value representing the REST resource this
38+
object represents. Servers may infer this from the endpoint the client
39+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
40+
type: string
41+
metadata:
42+
type: object
43+
spec:
44+
description: Spec defines the desired state of MutexTarget
45+
properties:
46+
machineConfigPools:
47+
description: A list of machineConfigPool resources to gather node
48+
membership and apply mutex rules to.
49+
items:
50+
type: string
51+
type: array
52+
type: object
53+
status:
54+
description: Status defines the observed state of MutexRule
55+
properties:
56+
conditions:
57+
items:
58+
properties:
59+
lastTransitionTime:
60+
type: string
61+
message:
62+
type: string
63+
reason:
64+
type: string
65+
status:
66+
type: string
67+
type:
68+
type: string
69+
type: object
70+
type: array
71+
nodes:
72+
description: A list of all nodes belonging to specified Machine Config
73+
Pools
74+
items:
75+
description: Node Name
76+
type: string
77+
type: array
78+
type: object
79+
type: object
80+
served: true
81+
storage: true
82+
subresources:
83+
status: {}
84+
status:
85+
acceptedNames:
86+
kind: ""
87+
plural: ""
88+
conditions: null
89+
storedVersions: null
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
annotations:
2+
# Core bundle annotations.
3+
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
4+
operators.operatorframework.io.bundle.manifests.v1: manifests/
5+
operators.operatorframework.io.bundle.metadata.v1: metadata/
6+
operators.operatorframework.io.bundle.package.v1: openshift-node-upgrade-mutex-operator
7+
operators.operatorframework.io.bundle.channels.v1: alpha
8+
operators.operatorframework.io.metrics.builder: operator-sdk-v1.35.0
9+
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
10+
operators.operatorframework.io.metrics.project_layout: ansible.sdk.operatorframework.io/v1
11+
12+
# Annotations for testing.
13+
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
14+
operators.operatorframework.io.test.config.v1: tests/scorecard/
15+
16+
com.redhat.openshift.versions: v4.16

0 commit comments

Comments
 (0)