-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add operator controller controllers and assets #10
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
assets/operator-controller/00-namespace-openshift-operator-controller.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: manager | ||
app.kubernetes.io/created-by: operator-controller | ||
app.kubernetes.io/instance: system | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: namespace | ||
app.kubernetes.io/part-of: operator-controller | ||
control-plane: controller-manager | ||
name: openshift-operator-controller |
109 changes: 109 additions & 0 deletions
109
...rator-controller/01-customresourcedefinition-operators.operators.operatorframework.io.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.10.0 | ||
creationTimestamp: null | ||
name: operators.operators.operatorframework.io | ||
spec: | ||
group: operators.operatorframework.io | ||
names: | ||
kind: Operator | ||
listKind: OperatorList | ||
plural: operators | ||
singular: operator | ||
scope: Cluster | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: Operator is the Schema for the operators API | ||
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: OperatorSpec defines the desired state of Operator | ||
properties: | ||
channel: | ||
description: Channel constraint definition | ||
maxLength: 48 | ||
pattern: ^[a-z0-9]+([\.-][a-z0-9]+)*$ | ||
type: string | ||
packageName: | ||
maxLength: 48 | ||
pattern: ^[a-z0-9]+(-[a-z0-9]+)*$ | ||
type: string | ||
version: | ||
description: "Version is an optional semver constraint on the package version. If not specified, the latest version available of the package will be installed. If specified, the specific version of the package will be installed so long as it is available in any of the content sources available. Examples: 1.2.3, 1.0.0-alpha, 1.0.0-rc.1 \n For more information on semver, please see https://semver.org/" | ||
maxLength: 64 | ||
pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ | ||
type: string | ||
required: | ||
- packageName | ||
type: object | ||
status: | ||
description: OperatorStatus defines the observed state of Operator | ||
properties: | ||
conditions: | ||
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, \n 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 | ||
x-kubernetes-list-map-keys: | ||
- type | ||
x-kubernetes-list-type: map | ||
installedBundleResource: | ||
type: string | ||
resolvedBundleResource: | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
13 changes: 13 additions & 0 deletions
13
...2-serviceaccount-openshift-operator-controller-operator-controller-controller-manager.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: operator-controller | ||
app.kubernetes.io/instance: controller-manager-sa | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: serviceaccount | ||
app.kubernetes.io/part-of: operator-controller | ||
name: operator-controller-controller-manager | ||
namespace: openshift-operator-controller |
45 changes: 45 additions & 0 deletions
45
...roller/03-role-openshift-operator-controller-operator-controller-leader-election-role.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: operator-controller | ||
app.kubernetes.io/instance: leader-election-role | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: role | ||
app.kubernetes.io/part-of: operator-controller | ||
name: operator-controller-leader-election-role | ||
namespace: openshift-operator-controller | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- update | ||
- patch | ||
- delete | ||
- apiGroups: | ||
- coordination.k8s.io | ||
resources: | ||
- leases | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- create | ||
- update | ||
- patch | ||
- delete | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- events | ||
verbs: | ||
- create | ||
- patch |
61 changes: 61 additions & 0 deletions
61
assets/operator-controller/04-clusterrole-operator-controller-manager-role.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
creationTimestamp: null | ||
name: operator-controller-manager-role | ||
rules: | ||
- apiGroups: | ||
- catalogd.operatorframework.io | ||
resources: | ||
- bundlemetadata | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- catalogd.operatorframework.io | ||
resources: | ||
- catalogs | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- catalogd.operatorframework.io | ||
resources: | ||
- packages | ||
verbs: | ||
- list | ||
- watch | ||
- apiGroups: | ||
- core.rukpak.io | ||
resources: | ||
- bundledeployments | ||
verbs: | ||
- create | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- operators.operatorframework.io | ||
resources: | ||
- operators | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- operators.operatorframework.io | ||
resources: | ||
- operators/finalizers | ||
verbs: | ||
- update | ||
- apiGroups: | ||
- operators.operatorframework.io | ||
resources: | ||
- operators/status | ||
verbs: | ||
- get | ||
- patch | ||
- update |
17 changes: 17 additions & 0 deletions
17
assets/operator-controller/05-clusterrole-operator-controller-metrics-reader.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: kube-rbac-proxy | ||
app.kubernetes.io/created-by: operator-controller | ||
app.kubernetes.io/instance: metrics-reader | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: clusterrole | ||
app.kubernetes.io/part-of: operator-controller | ||
name: operator-controller-metrics-reader | ||
rules: | ||
- nonResourceURLs: | ||
- /metrics | ||
verbs: | ||
- get |
25 changes: 25 additions & 0 deletions
25
assets/operator-controller/06-clusterrole-operator-controller-proxy-role.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: kube-rbac-proxy | ||
app.kubernetes.io/created-by: operator-controller | ||
app.kubernetes.io/instance: proxy-role | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: clusterrole | ||
app.kubernetes.io/part-of: operator-controller | ||
name: operator-controller-proxy-role | ||
rules: | ||
- apiGroups: | ||
- authentication.k8s.io | ||
resources: | ||
- tokenreviews | ||
verbs: | ||
- create | ||
- apiGroups: | ||
- authorization.k8s.io | ||
resources: | ||
- subjectaccessreviews | ||
verbs: | ||
- create |
21 changes: 21 additions & 0 deletions
21
...binding-openshift-operator-controller-operator-controller-leader-election-rolebinding.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: operator-controller | ||
app.kubernetes.io/instance: leader-election-rolebinding | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: rolebinding | ||
app.kubernetes.io/part-of: operator-controller | ||
name: operator-controller-leader-election-rolebinding | ||
namespace: openshift-operator-controller | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: operator-controller-leader-election-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: operator-controller-controller-manager | ||
namespace: openshift-operator-controller |
20 changes: 20 additions & 0 deletions
20
assets/operator-controller/08-clusterrolebinding-operator-controller-manager-rolebinding.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: rbac | ||
app.kubernetes.io/created-by: operator-controller | ||
app.kubernetes.io/instance: manager-rolebinding | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: clusterrolebinding | ||
app.kubernetes.io/part-of: operator-controller | ||
name: operator-controller-manager-rolebinding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: operator-controller-manager-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: operator-controller-controller-manager | ||
namespace: openshift-operator-controller |
20 changes: 20 additions & 0 deletions
20
assets/operator-controller/09-clusterrolebinding-operator-controller-proxy-rolebinding.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: kube-rbac-proxy | ||
app.kubernetes.io/created-by: operator-controller | ||
app.kubernetes.io/instance: proxy-rolebinding | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: clusterrolebinding | ||
app.kubernetes.io/part-of: operator-controller | ||
name: operator-controller-proxy-rolebinding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: operator-controller-proxy-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: operator-controller-controller-manager | ||
namespace: openshift-operator-controller |
22 changes: 22 additions & 0 deletions
22
...-openshift-operator-controller-operator-controller-controller-manager-metrics-service.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: kube-rbac-proxy | ||
app.kubernetes.io/created-by: operator-controller | ||
app.kubernetes.io/instance: controller-manager-metrics-service | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: service | ||
app.kubernetes.io/part-of: operator-controller | ||
control-plane: controller-manager | ||
name: operator-controller-controller-manager-metrics-service | ||
namespace: openshift-operator-controller | ||
spec: | ||
ports: | ||
- name: https | ||
port: 8443 | ||
protocol: TCP | ||
targetPort: https | ||
selector: | ||
control-plane: controller-manager |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, we should bump upstream to use v0.11.4. I made a fix there that removes
creationTimestamp: null
, which kustomize v5 barfs on.I'll work on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's a v0.12.0 now, so bumping all upstream repos to that: