diff --git a/Makefile b/Makefile index 14ba42ba..718f4ee9 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ build-template: manifests kustomize controller-gen $(KUSTOMIZE) build config/deployment-template | ./manifest2template.py > deploy.yml manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases + $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./api/..." output:crd:artifacts:config=config/crd/bases generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." diff --git a/config/crd/bases/webapp.test.k8s.elastic.co_embeddeds.yaml b/config/crd/bases/webapp.test.k8s.elastic.co_embeddeds.yaml deleted file mode 100644 index fb147362..00000000 --- a/config/crd/bases/webapp.test.k8s.elastic.co_embeddeds.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.14.0 - name: embeddeds.webapp.test.k8s.elastic.co -spec: - group: webapp.test.k8s.elastic.co - names: - kind: Embedded - listKind: EmbeddedList - plural: embeddeds - singular: embedded - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - a: - type: string - 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 - b: - type: string - c: - type: string - d: - type: string - e: - 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 - value: - x-kubernetes-preserve-unknown-fields: true - x: - type: string - type: object - served: true - storage: true diff --git a/config/crd/bases/webapp.test.k8s.elastic.co_guestbooks.yaml b/config/crd/bases/webapp.test.k8s.elastic.co_guestbooks.yaml deleted file mode 100644 index cf29aece..00000000 --- a/config/crd/bases/webapp.test.k8s.elastic.co_guestbooks.yaml +++ /dev/null @@ -1,223 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.14.0 - name: guestbooks.webapp.test.k8s.elastic.co -spec: - group: webapp.test.k8s.elastic.co - names: - kind: Guestbook - listKind: GuestbookList - plural: guestbooks - singular: guestbook - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: Guestbook is the Schema for the guestbooks 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: - default: - page: 1 - description: GuestbookSpec defines the desired state of Guestbook. - properties: - certificateRef: - description: CertificateRef is a reference to a secret containing - a certificate - properties: - group: - default: "" - description: |- - Group is the group of the referent. For example, "gateway.networking.k8s.io". - When unspecified or empty string, core API group is inferred. - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - default: Secret - description: Kind is kind of the referent. For example "Secret". - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: Name is the name of the referent. - maxLength: 253 - minLength: 1 - type: string - namespace: - description: |- - Namespace is the namespace of the backend. When unspecified, the local - namespace is inferred. - - - Note that when a namespace different than the local namespace is specified, - a ReferenceGrant object is required in the referent namespace to allow that - namespace's owner to accept the reference. See the ReferenceGrant - documentation for details. - - - Support: Core - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - required: - - name - type: object - entries: - description: Entries contain guest book entries for the page - items: - description: GuestbookEntry defines an entry in a guest book. - properties: - comment: - description: |- - Comment by guest. This can be a multi-line comment. - Like this one. - Now let's test a list: - * a - * b - - - Another isolated comment. - - - Looks good? - pattern: 0*[a-z0-9]*[a-z]*[0-9]*|\s - type: string - name: - description: Name of the guest (pipe | should be escaped) - maxLength: 80 - pattern: 0*[a-z0-9]*[a-z]*[0-9] - type: string - rating: - description: Rating provided by the guest - maximum: 5 - minimum: 1 - type: integer - time: - description: Time of entry - format: date-time - type: string - type: object - type: array - enum: - description: Enumeration is an example of an aliased enumeration type - enum: - - MyFirstValue - - MySecondValue - type: string - headers: - description: Headers contains a list of header items to include in - the page - items: - description: GuestbookHeaders are strings to include at the top - of a page. - type: string - maxItems: 10 - type: array - uniqueItems: true - page: - default: 1 - description: Page indicates the page number - example: 3 - minimum: 1 - type: integer - selector: - description: Selector selects something - 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 - x-kubernetes-map-type: atomic - str: - type: string - required: - - certificateRef - - enum - - str - type: object - x-kubernetes-validations: - - message: Please start a new book. - rule: self.page < 200 - status: - description: GuestbookStatus defines the observed state of Guestbook. - properties: - status: - allOf: - - enum: - - OK - - Unknown - - Error - - enum: - - OK - - Error - type: string - str: - type: string - required: - - status - - str - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/bases/webapp.test.k8s.elastic.co_underlyings.yaml b/config/crd/bases/webapp.test.k8s.elastic.co_underlyings.yaml deleted file mode 100644 index b2df775f..00000000 --- a/config/crd/bases/webapp.test.k8s.elastic.co_underlyings.yaml +++ /dev/null @@ -1,47 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.14.0 - name: underlyings.webapp.test.k8s.elastic.co -spec: - group: webapp.test.k8s.elastic.co - names: - kind: Underlying - listKind: UnderlyingList - plural: underlyings - singular: underlying - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: Underlying tests that Underlying1's underlying type is Underlying2 - instead of string. - properties: - a: - default: b - description: Underlying1 has an underlying type with an underlying type - maxLength: 10 - type: string - 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 - type: object - served: true - storage: true diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 13d780b0..e69de29b 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -1,199 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: manager-role -rules: -- apiGroups: - - "" - resources: - - configmaps - - events - - namespaces - - persistentvolumeclaims - - secrets - - serviceaccounts - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - endpoints - - pods - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - deployments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - batch - resources: - - cronjobs - - jobs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - cloud.redhat.com - resources: - - bundles - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - cloud.redhat.com - resources: - - bundles/finalizers - verbs: - - update -- apiGroups: - - cloud.redhat.com - resources: - - bundles/status - verbs: - - get - - patch - - update -- apiGroups: - - cloud.redhat.com - resources: - - frontendenvironments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - cloud.redhat.com - resources: - - frontendenvironments/finalizers - verbs: - - update -- apiGroups: - - cloud.redhat.com - resources: - - frontendenvironments/status - verbs: - - get - - patch - - update -- apiGroups: - - cloud.redhat.com - resources: - - frontends - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - cloud.redhat.com - resources: - - frontends/finalizers - verbs: - - update -- apiGroups: - - cloud.redhat.com - resources: - - frontends/status - verbs: - - get - - patch - - update -- apiGroups: - - monitoring.coreos.com - resources: - - prometheuses - - servicemonitors - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - webapp.test.k8s.elastic.co - resources: - - guestbooks - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - webapp.test.k8s.elastic.co - resources: - - guestbooks/finalizers - verbs: - - update -- apiGroups: - - webapp.test.k8s.elastic.co - resources: - - guestbooks/status - verbs: - - get - - patch - - update diff --git a/deploy.yml b/deploy.yml index ed797b6b..6418efa2 100644 --- a/deploy.yml +++ b/deploy.yml @@ -1243,204 +1243,6 @@ objects: - frontendenvironments/status verbs: - get -- apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: frontend-operator-manager-role - rules: - - apiGroups: - - '' - resources: - - configmaps - - events - - namespaces - - persistentvolumeclaims - - secrets - - serviceaccounts - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - '' - resources: - - endpoints - - pods - verbs: - - get - - list - - watch - - apiGroups: - - '' - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - apps - resources: - - deployments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - batch - resources: - - cronjobs - - jobs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - cloud.redhat.com - resources: - - bundles - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - cloud.redhat.com - resources: - - bundles/finalizers - verbs: - - update - - apiGroups: - - cloud.redhat.com - resources: - - bundles/status - verbs: - - get - - patch - - update - - apiGroups: - - cloud.redhat.com - resources: - - frontendenvironments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - cloud.redhat.com - resources: - - frontendenvironments/finalizers - verbs: - - update - - apiGroups: - - cloud.redhat.com - resources: - - frontendenvironments/status - verbs: - - get - - patch - - update - - apiGroups: - - cloud.redhat.com - resources: - - frontends - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - cloud.redhat.com - resources: - - frontends/finalizers - verbs: - - update - - apiGroups: - - cloud.redhat.com - resources: - - frontends/status - verbs: - - get - - patch - - update - - apiGroups: - - monitoring.coreos.com - resources: - - prometheuses - - servicemonitors - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - webapp.test.k8s.elastic.co - resources: - - guestbooks - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - webapp.test.k8s.elastic.co - resources: - - guestbooks/finalizers - verbs: - - update - - apiGroups: - - webapp.test.k8s.elastic.co - resources: - - guestbooks/status - verbs: - - get - - patch - - update - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -1487,7 +1289,7 @@ objects: roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: frontend-operator-manager-role + name: manager-role subjects: - kind: ServiceAccount name: frontend-operator-controller-manager