From c76d297e10fe10964e114204e2d0c6a6919ff62d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 08:45:06 -0400 Subject: [PATCH 01/13] Add replicas to spec --- api/v1alpha1/frontend_types.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 0c0f3a1a..105289e3 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -115,6 +115,7 @@ type FrontendSpec struct { ServiceTiles []*ServiceTile `json:"serviceTiles,omitempty" yaml:"serviceTiles,omitempty"` // Data for the available widgets for the resource WidgetRegistry []*WidgetEntry `json:"widgetRegistry,omitempty" yaml:"widgetRegistry,omitempty"` + Replicas int32 `json:"replicas,omitempty" yaml:"replicas,omitempty"` } var ReconciliationSuccessful = "ReconciliationSuccessful" From ddeabe494792b1f0a84d3875a431549d8de7defc Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 08:54:46 -0400 Subject: [PATCH 02/13] Add replica code at deployment creation time, change replica type --- api/v1alpha1/frontend_types.go | 2 +- controllers/reconcile.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 105289e3..dec29d65 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -115,7 +115,7 @@ type FrontendSpec struct { ServiceTiles []*ServiceTile `json:"serviceTiles,omitempty" yaml:"serviceTiles,omitempty"` // Data for the available widgets for the resource WidgetRegistry []*WidgetEntry `json:"widgetRegistry,omitempty" yaml:"widgetRegistry,omitempty"` - Replicas int32 `json:"replicas,omitempty" yaml:"replicas,omitempty"` + Replicas *int32 `json:"replicas,omitempty" yaml:"replicas,omitempty"` } var ReconciliationSuccessful = "ReconciliationSuccessful" diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 20bd51c3..bb2d86ce 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -400,6 +400,13 @@ func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map labeler := utils.GetCustomLabeler(labels, nn, r.Frontend) labeler(d) + // Set the replicas if specified, otherwise default to 1 + if r.Frontend.Spec.Replicas != nil { + d.Spec.Replicas = r.Frontend.Spec.Replicas + } else { + d.Spec.Replicas = utils.Int32Ptr(1) + } + populateVolumes(d, r.Frontend, r.FrontendEnvironment) populateContainer(d, r.Frontend, r.FrontendEnvironment) r.populateEnvVars(d, r.FrontendEnvironment) From 1c97c00ecb658e049842aba6210e07ae640ba4c0 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 09:04:19 -0400 Subject: [PATCH 03/13] Add replica test --- tests/e2e/replicas/00-create-namespace.yaml | 8 ++ tests/e2e/replicas/01-create-resources.yaml | 75 +++++++++++++ tests/e2e/replicas/02-assert.yaml | 112 ++++++++++++++++++++ 3 files changed, 195 insertions(+) create mode 100644 tests/e2e/replicas/00-create-namespace.yaml create mode 100644 tests/e2e/replicas/01-create-resources.yaml create mode 100644 tests/e2e/replicas/02-assert.yaml diff --git a/tests/e2e/replicas/00-create-namespace.yaml b/tests/e2e/replicas/00-create-namespace.yaml new file mode 100644 index 00000000..b421aee2 --- /dev/null +++ b/tests/e2e/replicas/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-basic-app +spec: + finalizers: + - kubernetes diff --git a/tests/e2e/replicas/01-create-resources.yaml b/tests/e2e/replicas/01-create-resources.yaml new file mode 100644 index 00000000..691cdfc3 --- /dev/null +++ b/tests/e2e/replicas/01-create-resources.yaml @@ -0,0 +1,75 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-basic-app-environment +spec: + generateNavJSON: false + ssl: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome-big + namespace: test-basic-app +spec: + replicas: 3 + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-basic-app-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome-small + namespace: test-basic-app +spec: + replicas: 2 + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-basic-app-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome-default + namespace: test-basic-app +spec: + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-basic-app-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome \ No newline at end of file diff --git a/tests/e2e/replicas/02-assert.yaml b/tests/e2e/replicas/02-assert.yaml new file mode 100644 index 00000000..9e06ae9d --- /dev/null +++ b/tests/e2e/replicas/02-assert.yaml @@ -0,0 +1,112 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-frontend + namespace: test-basic-app + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-big +spec: + replicas: 4 + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-basic-app-environment + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/stable/operator-generated +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-small + namespace: test-basic-app + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + replicas: 2 + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-basic-app-environment + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/stable/operator-generated +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-default + namespace: test-basic-app + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + replicas: 1 + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-basic-app-environment + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/stable/operator-generated + From 432d6be88bc213cebcd58a58e0d8a7c2638c63ad Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 09:22:08 -0400 Subject: [PATCH 04/13] make build-template --- .../crd/bases/cloud.redhat.com_bundles.yaml | 26 +-- ...cloud.redhat.com_frontendenvironments.yaml | 46 ++-- .../crd/bases/cloud.redhat.com_frontends.yaml | 88 ++++---- config/rbac/role.yaml | 1 + deploy.yml | 199 +++++++----------- 5 files changed, 164 insertions(+), 196 deletions(-) diff --git a/config/crd/bases/cloud.redhat.com_bundles.yaml b/config/crd/bases/cloud.redhat.com_bundles.yaml index 856fdf1b..d54442cd 100644 --- a/config/crd/bases/cloud.redhat.com_bundles.yaml +++ b/config/crd/bases/cloud.redhat.com_bundles.yaml @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null name: bundles.cloud.redhat.com spec: group: cloud.redhat.com @@ -20,19 +21,14 @@ spec: description: Bundle is the Schema for the Bundles 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 + 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 + 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 @@ -286,3 +282,9 @@ spec: storage: true subresources: status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml index d75843d1..21b666f7 100644 --- a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml +++ b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null name: frontendenvironments.cloud.redhat.com spec: group: cloud.redhat.com @@ -30,19 +31,14 @@ spec: 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 + 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 + 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 @@ -64,10 +60,9 @@ spec: description: Enable Akamai Cache Bust type: boolean generateNavJSON: - description: |- - GenerateNavJSON determines if the nav json configmap - parts should be generated for the bundles. We want to do - do this in epehemeral environments but not in production + description: GenerateNavJSON determines if the nav json configmap + parts should be generated for the bundles. We want to do do this + in epehemeral environments but not in production type: boolean hostname: description: Hostname @@ -76,10 +71,9 @@ spec: description: Ingress class type: string monitoring: - description: |- - MonitorMode determines where a ServiceMonitor object will be placed - local will add it to the frontend's namespace - app-interface will add it to "openshift-customer-monitoring" + description: MonitorMode determines where a ServiceMonitor object + will be placed local will add it to the frontend's namespace app-interface + will add it to "openshift-customer-monitoring" properties: disabled: type: boolean @@ -93,9 +87,9 @@ spec: - mode type: object ssl: - description: |- - SSL mode requests SSL from the services in openshift and k8s and then applies them to the - pod, the route is also set to reencrypt in the case of OpenShift + description: SSL mode requests SSL from the services in openshift + and k8s and then applies them to the pod, the route is also set + to reencrypt in the case of OpenShift type: boolean sso: description: Foo is an example field of FrontendEnvironment. Edit @@ -117,3 +111,9 @@ spec: storage: true subresources: status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/bases/cloud.redhat.com_frontends.yaml b/config/crd/bases/cloud.redhat.com_frontends.yaml index d3775354..50bdc68b 100644 --- a/config/crd/bases/cloud.redhat.com_frontends.yaml +++ b/config/crd/bases/cloud.redhat.com_frontends.yaml @@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null name: frontends.cloud.redhat.com spec: group: cloud.redhat.com @@ -35,19 +36,14 @@ spec: description: Frontend is the Schema for the frontends 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 + 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 + 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 @@ -304,6 +300,9 @@ spec: - title type: object type: array + replicas: + format: int32 + type: integer searchEntries: description: The search index partials for the resource items: @@ -502,42 +501,42 @@ spec: conditions: items: description: "Condition contains details for one aspect of the current - state of this API Resource.\n---\nThis struct is intended for - direct use as an array at the field path .status.conditions. For - example,\n\n\n\ttype FooStatus struct{\n\t // Represents the - observations of a foo's current state.\n\t // Known .status.conditions.type - are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // - +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t - \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" - patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t - \ // other fields\n\t}" + 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. + 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. + 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. + 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. + 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 @@ -551,12 +550,11 @@ spec: - 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) + 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 @@ -590,3 +588,9 @@ spec: storage: true subresources: status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index db93e553..090fe2dc 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,6 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + creationTimestamp: null name: manager-role rules: - apiGroups: diff --git a/deploy.yml b/deploy.yml index b2fdaa14..36be6f1a 100644 --- a/deploy.yml +++ b/deploy.yml @@ -13,7 +13,8 @@ objects: kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null name: bundles.cloud.redhat.com spec: group: cloud.redhat.com @@ -31,27 +32,14 @@ objects: 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' + 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' + 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 @@ -305,11 +293,18 @@ objects: storage: true subresources: status: {} + status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] - apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null name: frontendenvironments.cloud.redhat.com spec: group: cloud.redhat.com @@ -337,27 +332,14 @@ objects: 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' + 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' + 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 @@ -379,11 +361,9 @@ objects: description: Enable Akamai Cache Bust type: boolean generateNavJSON: - description: 'GenerateNavJSON determines if the nav json configmap - - parts should be generated for the bundles. We want to do - - do this in epehemeral environments but not in production' + description: GenerateNavJSON determines if the nav json configmap + parts should be generated for the bundles. We want to do do this + in epehemeral environments but not in production type: boolean hostname: description: Hostname @@ -392,12 +372,9 @@ objects: description: Ingress class type: string monitoring: - description: 'MonitorMode determines where a ServiceMonitor object - will be placed - - local will add it to the frontend''s namespace - - app-interface will add it to "openshift-customer-monitoring"' + description: MonitorMode determines where a ServiceMonitor object + will be placed local will add it to the frontend's namespace app-interface + will add it to "openshift-customer-monitoring" properties: disabled: type: boolean @@ -411,10 +388,9 @@ objects: - mode type: object ssl: - description: 'SSL mode requests SSL from the services in openshift - and k8s and then applies them to the - - pod, the route is also set to reencrypt in the case of OpenShift' + description: SSL mode requests SSL from the services in openshift + and k8s and then applies them to the pod, the route is also set + to reencrypt in the case of OpenShift type: boolean sso: description: Foo is an example field of FrontendEnvironment. Edit @@ -437,11 +413,18 @@ objects: storage: true subresources: status: {} + status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] - apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null name: frontends.cloud.redhat.com spec: group: cloud.redhat.com @@ -474,27 +457,14 @@ objects: 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' + 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' + 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 @@ -751,6 +721,9 @@ objects: - title type: object type: array + replicas: + format: int32 + type: integer searchEntries: description: The search index partials for the resource items: @@ -949,57 +922,44 @@ objects: conditions: items: description: "Condition contains details for one aspect of the\ - \ current state of this API Resource.\n---\nThis struct is intended\ + \ 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\n\n\ttype FooStatus struct{\n\t // Represents\ - \ the observations of a foo's current state.\n\t // Known\ - \ .status.conditions.type are: \"Available\", \"Progressing\"\ - , and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\ - \t // +listType=map\n\t // +listMapKey=type\n\t Conditions\ - \ []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"\ - merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"\ - `\n\n\n\t // other fields\n\t}" + \ 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.' + 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.' + 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.' + 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.' + 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_])?$ @@ -1013,17 +973,11 @@ objects: - Unknown type: string type: - description: 'type of condition in CamelCase or in foo.example.com/CamelCase. - - --- - - Many .condition.type values are consistent across resources + 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)' + 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 @@ -1057,6 +1011,12 @@ objects: storage: true subresources: status: {} + status: + acceptedNames: + kind: '' + plural: '' + conditions: [] + storedVersions: [] - apiVersion: v1 kind: ServiceAccount metadata: @@ -1243,6 +1203,7 @@ objects: - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + creationTimestamp: null name: frontend-operator-manager-role rules: - apiGroups: From 4d3a9401e32153ba7d6e239f21cc364bfab2a41f Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 09:39:42 -0400 Subject: [PATCH 05/13] More pre-push activiti8es --- api/v1alpha1/zz_generated.deepcopy.go | 5 + .../crd/bases/cloud.redhat.com_bundles.yaml | 26 +- ...cloud.redhat.com_frontendenvironments.yaml | 46 +- .../crd/bases/cloud.redhat.com_frontends.yaml | 85 +- .../webapp.test.k8s.elastic.co_embeddeds.yaml | 54 ++ ...webapp.test.k8s.elastic.co_guestbooks.yaml | 223 ++++++ ...ebapp.test.k8s.elastic.co_underlyings.yaml | 47 ++ config/rbac/role.yaml | 27 +- deploy.yml | 222 ++++-- .../modules/ROOT/pages/api_reference.adoc | 731 +++++++++++++----- 10 files changed, 1134 insertions(+), 332 deletions(-) create mode 100644 config/crd/bases/webapp.test.k8s.elastic.co_embeddeds.yaml create mode 100644 config/crd/bases/webapp.test.k8s.elastic.co_guestbooks.yaml create mode 100644 config/crd/bases/webapp.test.k8s.elastic.co_underlyings.yaml diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 873a5837..253569c3 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -576,6 +576,11 @@ func (in *FrontendSpec) DeepCopyInto(out *FrontendSpec) { } } } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontendSpec. diff --git a/config/crd/bases/cloud.redhat.com_bundles.yaml b/config/crd/bases/cloud.redhat.com_bundles.yaml index d54442cd..856fdf1b 100644 --- a/config/crd/bases/cloud.redhat.com_bundles.yaml +++ b/config/crd/bases/cloud.redhat.com_bundles.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: bundles.cloud.redhat.com spec: group: cloud.redhat.com @@ -21,14 +20,19 @@ spec: description: Bundle is the Schema for the Bundles 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' + 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' + 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 @@ -282,9 +286,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml index 21b666f7..d75843d1 100644 --- a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml +++ b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: frontendenvironments.cloud.redhat.com spec: group: cloud.redhat.com @@ -31,14 +30,19 @@ spec: 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' + 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' + 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 @@ -60,9 +64,10 @@ spec: description: Enable Akamai Cache Bust type: boolean generateNavJSON: - description: GenerateNavJSON determines if the nav json configmap - parts should be generated for the bundles. We want to do do this - in epehemeral environments but not in production + description: |- + GenerateNavJSON determines if the nav json configmap + parts should be generated for the bundles. We want to do + do this in epehemeral environments but not in production type: boolean hostname: description: Hostname @@ -71,9 +76,10 @@ spec: description: Ingress class type: string monitoring: - description: MonitorMode determines where a ServiceMonitor object - will be placed local will add it to the frontend's namespace app-interface - will add it to "openshift-customer-monitoring" + description: |- + MonitorMode determines where a ServiceMonitor object will be placed + local will add it to the frontend's namespace + app-interface will add it to "openshift-customer-monitoring" properties: disabled: type: boolean @@ -87,9 +93,9 @@ spec: - mode type: object ssl: - description: SSL mode requests SSL from the services in openshift - and k8s and then applies them to the pod, the route is also set - to reencrypt in the case of OpenShift + description: |- + SSL mode requests SSL from the services in openshift and k8s and then applies them to the + pod, the route is also set to reencrypt in the case of OpenShift type: boolean sso: description: Foo is an example field of FrontendEnvironment. Edit @@ -111,9 +117,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/cloud.redhat.com_frontends.yaml b/config/crd/bases/cloud.redhat.com_frontends.yaml index 50bdc68b..0f17e58e 100644 --- a/config/crd/bases/cloud.redhat.com_frontends.yaml +++ b/config/crd/bases/cloud.redhat.com_frontends.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: frontends.cloud.redhat.com spec: group: cloud.redhat.com @@ -36,14 +35,19 @@ spec: description: Frontend is the Schema for the frontends 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' + 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' + 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 @@ -501,42 +505,42 @@ spec: 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 }" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" 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. + 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. + 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. + 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. + 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 @@ -550,11 +554,12 @@ spec: - 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) + 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 @@ -588,9 +593,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/webapp.test.k8s.elastic.co_embeddeds.yaml b/config/crd/bases/webapp.test.k8s.elastic.co_embeddeds.yaml new file mode 100644 index 00000000..fb147362 --- /dev/null +++ b/config/crd/bases/webapp.test.k8s.elastic.co_embeddeds.yaml @@ -0,0 +1,54 @@ +--- +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 new file mode 100644 index 00000000..cf29aece --- /dev/null +++ b/config/crd/bases/webapp.test.k8s.elastic.co_guestbooks.yaml @@ -0,0 +1,223 @@ +--- +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 new file mode 100644 index 00000000..b2df775f --- /dev/null +++ b/config/crd/bases/webapp.test.k8s.elastic.co_underlyings.yaml @@ -0,0 +1,47 @@ +--- +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 090fe2dc..13d780b0 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: manager-role rules: - apiGroups: @@ -172,3 +171,29 @@ rules: - 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 36be6f1a..ed797b6b 100644 --- a/deploy.yml +++ b/deploy.yml @@ -13,8 +13,7 @@ objects: kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: bundles.cloud.redhat.com spec: group: cloud.redhat.com @@ -32,14 +31,27 @@ objects: 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' + 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' + 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 @@ -293,18 +305,11 @@ objects: storage: true subresources: status: {} - status: - acceptedNames: - kind: '' - plural: '' - conditions: [] - storedVersions: [] - apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: frontendenvironments.cloud.redhat.com spec: group: cloud.redhat.com @@ -332,14 +337,27 @@ objects: 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' + 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' + 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 @@ -361,9 +379,11 @@ objects: description: Enable Akamai Cache Bust type: boolean generateNavJSON: - description: GenerateNavJSON determines if the nav json configmap - parts should be generated for the bundles. We want to do do this - in epehemeral environments but not in production + description: 'GenerateNavJSON determines if the nav json configmap + + parts should be generated for the bundles. We want to do + + do this in epehemeral environments but not in production' type: boolean hostname: description: Hostname @@ -372,9 +392,12 @@ objects: description: Ingress class type: string monitoring: - description: MonitorMode determines where a ServiceMonitor object - will be placed local will add it to the frontend's namespace app-interface - will add it to "openshift-customer-monitoring" + description: 'MonitorMode determines where a ServiceMonitor object + will be placed + + local will add it to the frontend''s namespace + + app-interface will add it to "openshift-customer-monitoring"' properties: disabled: type: boolean @@ -388,9 +411,10 @@ objects: - mode type: object ssl: - description: SSL mode requests SSL from the services in openshift - and k8s and then applies them to the pod, the route is also set - to reencrypt in the case of OpenShift + description: 'SSL mode requests SSL from the services in openshift + and k8s and then applies them to the + + pod, the route is also set to reencrypt in the case of OpenShift' type: boolean sso: description: Foo is an example field of FrontendEnvironment. Edit @@ -413,18 +437,11 @@ objects: storage: true subresources: status: {} - status: - acceptedNames: - kind: '' - plural: '' - conditions: [] - storedVersions: [] - apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: frontends.cloud.redhat.com spec: group: cloud.redhat.com @@ -457,14 +474,27 @@ objects: 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' + 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' + 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 @@ -922,44 +952,57 @@ objects: conditions: items: description: "Condition contains details for one aspect of the\ - \ current state of this API Resource. --- This struct is intended\ + \ current state of this API Resource.\n---\nThis 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 }" + \ For example,\n\n\n\ttype FooStatus struct{\n\t // Represents\ + \ the observations of a foo's current state.\n\t // Known\ + \ .status.conditions.type are: \"Available\", \"Progressing\"\ + , and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\ + \t // +listType=map\n\t // +listMapKey=type\n\t Conditions\ + \ []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"\ + merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"\ + `\n\n\n\t // other fields\n\t}" 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. + 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. + 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. + 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. + 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_])?$ @@ -973,11 +1016,17 @@ objects: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources + 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) + 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 @@ -1011,12 +1060,6 @@ objects: storage: true subresources: status: {} - status: - acceptedNames: - kind: '' - plural: '' - conditions: [] - storedVersions: [] - apiVersion: v1 kind: ServiceAccount metadata: @@ -1203,7 +1246,6 @@ objects: - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: frontend-operator-manager-role rules: - apiGroups: @@ -1373,6 +1415,32 @@ objects: - 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: diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index 5c5b7309..9ede59d6 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -24,7 +24,11 @@ Package v1alpha1 contains API Schema definitions for the v1alpha1 API group [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-apiinfo"] -==== APIInfo +==== APIInfo + + + + @@ -33,54 +37,87 @@ Package v1alpha1 contains API Schema definitions for the v1alpha1 API group - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`versions`* __string array__ | +| Field | Description | Default | Validation +| *`versions`* __string array__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-analytics"] +==== Analytics + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-fedmodule[$$FedModule$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`APIKey`* __string__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundle"] -==== Bundle +==== Bundle + + Bundle is the Schema for the Bundles API + + .Appears In: **** - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlelist[$$BundleList$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` -| *`kind`* __string__ | `Bundle` +| Field | Description | Default | Validation +| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` | | +| *`kind`* __string__ | `Bundle` | | | *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlespec[$$BundleSpec$$]__ | + | | +| *`spec`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlespec[$$BundleSpec$$]__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlelist"] -==== BundleList +==== BundleList + + BundleList contains a list of Bundle -[cols="25a,75a", options="header"] + + +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` -| *`kind`* __string__ | `BundleList` +| Field | Description | Default | Validation +| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` | | +| *`kind`* __string__ | `BundleList` | | | *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#listmeta-v1-meta[$$ListMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`items`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundle[$$Bundle$$] array__ | + | | +| *`items`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundle[$$Bundle$$] array__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem"] -==== BundleNavItem +==== BundleNavItem + + + + @@ -92,27 +129,31 @@ BundleList contains a list of Bundle - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`title`* __string__ | -| *`groupId`* __string__ | -| *`icon`* __string__ | -| *`navItems`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-leafbundlenavitem[$$LeafBundleNavItem$$] array__ | -| *`appId`* __string__ | -| *`href`* __string__ | -| *`product`* __string__ | -| *`isExternal`* __boolean__ | -| *`filterable`* __boolean__ | -| *`permissions`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermission[$$BundlePermission$$] array__ | -| *`routes`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-embeddedroute[$$EmbeddedRoute$$] array__ | -| *`expandable`* __boolean__ | -| *`dynamicNav`* __string__ | +| Field | Description | Default | Validation +| *`title`* __string__ | | | +| *`groupId`* __string__ | | | +| *`icon`* __string__ | | | +| *`navItems`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-leafbundlenavitem[$$LeafBundleNavItem$$] array__ | | | +| *`appId`* __string__ | | | +| *`href`* __string__ | | | +| *`product`* __string__ | | | +| *`isExternal`* __boolean__ | | | +| *`filterable`* __boolean__ | | | +| *`permissions`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermission[$$BundlePermission$$] array__ | | | +| *`routes`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-embeddedroute[$$EmbeddedRoute$$] array__ | | | +| *`expandable`* __boolean__ | | | +| *`dynamicNav`* __string__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermission"] -==== BundlePermission +==== BundlePermission + + + + @@ -122,33 +163,53 @@ BundleList contains a list of Bundle - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-leafbundlenavitem[$$LeafBundleNavItem$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`method`* __string__ | -| *`args`* __BundlePermissionArg array__ | +| Field | Description | Default | Validation +| *`method`* __string__ | | | +| *`args`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermissionarg[$$BundlePermissionArg$$] array__ | | | |=== +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermissionarg"] +==== BundlePermissionArg + +_Underlying type:_ _string_ + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermission[$$BundlePermission$$] +**** + + + [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlespec"] -==== BundleSpec +==== BundleSpec + + BundleSpec defines the desired state of Bundle + + .Appears In: **** - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundle[$$Bundle$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`id`* __string__ | Foo is an example field of Bundle. Edit Bundle_types.go to remove/update -| *`title`* __string__ | -| *`appList`* __string array__ | -| *`envName`* __string__ | -| *`extraNavItems`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-extranavitem[$$ExtraNavItem$$] array__ | -| *`customNav`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$] array__ | +| Field | Description | Default | Validation +| *`id`* __string__ | Foo is an example field of Bundle. Edit Bundle_types.go to remove/update + | | +| *`title`* __string__ | | | +| *`appList`* __string array__ | | | +| *`envName`* __string__ | | | +| *`extraNavItems`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-extranavitem[$$ExtraNavItem$$] array__ | | | +| *`customNav`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$] array__ | | | |=== @@ -157,28 +218,36 @@ BundleSpec defines the desired state of Bundle [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-embeddedroute"] -==== EmbeddedRoute +==== EmbeddedRoute + + EmbeddedRoutes allow deeply nested navs to have support for routes + + .Appears In: **** - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$] - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-leafbundlenavitem[$$LeafBundleNavItem$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`title`* __string__ | -| *`appId`* __string__ | -| *`href`* __string__ | -| *`product`* __string__ | +| Field | Description | Default | Validation +| *`title`* __string__ | | | +| *`appId`* __string__ | | | +| *`href`* __string__ | | | +| *`product`* __string__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-extranavitem"] -==== ExtraNavItem +==== ExtraNavItem + + + + @@ -187,16 +256,20 @@ EmbeddedRoutes allow deeply nested navs to have support for routes - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlespec[$$BundleSpec$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`name`* __string__ | -| *`navItem`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$]__ | +| Field | Description | Default | Validation +| *`name`* __string__ | | | +| *`navItem`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$]__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-fedmodule"] -==== FedModule +==== FedModule + + + + @@ -205,40 +278,52 @@ EmbeddedRoutes allow deeply nested navs to have support for routes - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`manifestLocation`* __string__ | -| *`modules`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-module[$$Module$$] array__ | -| *`moduleID`* __string__ | -| *`config`* __JSON__ | -| *`fullProfile`* __boolean__ | +| Field | Description | Default | Validation +| *`manifestLocation`* __string__ | | | +| *`modules`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-module[$$Module$$] array__ | | | +| *`moduleID`* __string__ | | | +| *`config`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#json-v1-apiextensions-k8s-io[$$JSON$$]__ | | | +| *`moduleConfig`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-moduleconfig[$$ModuleConfig$$]__ | | | +| *`fullProfile`* __boolean__ | | | +| *`defaultDocumentTitle`* __string__ | | | +| *`isFedramp`* __boolean__ | | | +| *`analytics`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-analytics[$$Analytics$$]__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontend"] -==== Frontend +==== Frontend + + Frontend is the Schema for the frontends API + + .Appears In: **** - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendlist[$$FrontendList$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` -| *`kind`* __string__ | `Frontend` +| Field | Description | Default | Validation +| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` | | +| *`kind`* __string__ | `Frontend` | | | *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$]__ | + | | +| *`spec`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$]__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontenddeployments"] -==== FrontendDeployments +==== FrontendDeployments + + + + @@ -247,84 +332,105 @@ Frontend is the Schema for the frontends API - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendstatus[$$FrontendStatus$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`managedDeployments`* __integer__ | -| *`readyDeployments`* __integer__ | +| Field | Description | Default | Validation +| *`managedDeployments`* __integer__ | | | +| *`readyDeployments`* __integer__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironment"] -==== FrontendEnvironment +==== FrontendEnvironment + + FrontendEnvironment is the Schema for the FrontendEnvironments API + + .Appears In: **** - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironmentlist[$$FrontendEnvironmentList$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` -| *`kind`* __string__ | `FrontendEnvironment` +| Field | Description | Default | Validation +| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` | | +| *`kind`* __string__ | `FrontendEnvironment` | | | *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironmentspec[$$FrontendEnvironmentSpec$$]__ | + | | +| *`spec`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironmentspec[$$FrontendEnvironmentSpec$$]__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironmentlist"] -==== FrontendEnvironmentList +==== FrontendEnvironmentList + + FrontendEnvironmentList contains a list of FrontendEnvironment -[cols="25a,75a", options="header"] + + +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` -| *`kind`* __string__ | `FrontendEnvironmentList` +| Field | Description | Default | Validation +| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` | | +| *`kind`* __string__ | `FrontendEnvironmentList` | | | *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#listmeta-v1-meta[$$ListMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`items`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironment[$$FrontendEnvironment$$] array__ | + | | +| *`items`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironment[$$FrontendEnvironment$$] array__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironmentspec"] -==== FrontendEnvironmentSpec +==== FrontendEnvironmentSpec + + FrontendEnvironmentSpec defines the desired state of FrontendEnvironment + + .Appears In: **** - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironment[$$FrontendEnvironment$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`sso`* __string__ | Foo is an example field of FrontendEnvironment. Edit FrontendEnvironment_types.go to remove/update -| *`ingressClass`* __string__ | Ingress class -| *`hostname`* __string__ | Hostname -| *`whitelist`* __string array__ | Whitelist CIDRs -| *`monitoring`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-monitoringconfig[$$MonitoringConfig$$]__ | MonitorMode determines where a ServiceMonitor object will be placed local will add it to the frontend's namespace app-interface will add it to "openshift-customer-monitoring" -| *`ssl`* __boolean__ | SSL mode requests SSL from the services in openshift and k8s and then applies them to the pod, the route is also set to reencrypt in the case of OpenShift -| *`generateNavJSON`* __boolean__ | GenerateNavJSON determines if the nav json configmap parts should be generated for the bundles. We want to do do this in epehemeral environments but not in production -| *`enableAkamaiCacheBust`* __boolean__ | Enable Akamai Cache Bust -| *`akamaiCacheBustImage`* __string__ | Set Akamai Cache Bust Image -| *`akamaiCacheBustURL`* __string__ | Set Akamai Cache Bust URL that the files will hang off of -| *`akamaiSecretName`* __string__ | The name of the secret we will use to get the akamai credentials +| Field | Description | Default | Validation +| *`sso`* __string__ | Foo is an example field of FrontendEnvironment. Edit FrontendEnvironment_types.go to remove/update + | | +| *`ingressClass`* __string__ | Ingress class + | | +| *`hostname`* __string__ | Hostname + | | +| *`whitelist`* __string array__ | Whitelist CIDRs + | | +| *`monitoring`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-monitoringconfig[$$MonitoringConfig$$]__ | MonitorMode determines where a ServiceMonitor object will be placed + +local will add it to the frontend's namespace + +app-interface will add it to "openshift-customer-monitoring" + | | +| *`ssl`* __boolean__ | SSL mode requests SSL from the services in openshift and k8s and then applies them to the + +pod, the route is also set to reencrypt in the case of OpenShift + | | +| *`generateNavJSON`* __boolean__ | GenerateNavJSON determines if the nav json configmap + +parts should be generated for the bundles. We want to do + +do this in epehemeral environments but not in production + | | +| *`enableAkamaiCacheBust`* __boolean__ | Enable Akamai Cache Bust + | | +| *`akamaiCacheBustImage`* __string__ | Set Akamai Cache Bust Image + | | +| *`akamaiCacheBustURL`* __string__ | Set Akamai Cache Bust URL that the files will hang off of + | | +| *`akamaiSecretName`* __string__ | The name of the secret we will use to get the akamai credentials + | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendinfo"] -==== FrontendInfo +==== FrontendInfo + + + + @@ -333,65 +439,81 @@ FrontendEnvironmentSpec defines the desired state of FrontendEnvironment - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`paths`* __string array__ | +| Field | Description | Default | Validation +| *`paths`* __string array__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendlist"] -==== FrontendList +==== FrontendList + + FrontendList contains a list of Frontend -[cols="25a,75a", options="header"] + + +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` -| *`kind`* __string__ | `FrontendList` +| Field | Description | Default | Validation +| *`apiVersion`* __string__ | `cloud.redhat.com/v1alpha1` | | +| *`kind`* __string__ | `FrontendList` | | | *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#listmeta-v1-meta[$$ListMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`items`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontend[$$Frontend$$] array__ | + | | +| *`items`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontend[$$Frontend$$] array__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec"] -==== FrontendSpec +==== FrontendSpec + + FrontendSpec defines the desired state of Frontend + + .Appears In: **** - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontend[$$Frontend$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`disabled`* __boolean__ | -| *`envName`* __string__ | -| *`title`* __string__ | -| *`deploymentRepo`* __string__ | -| *`API`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-apiinfo[$$APIInfo$$]__ | -| *`frontend`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendinfo[$$FrontendInfo$$]__ | -| *`image`* __string__ | -| *`service`* __string__ | -| *`serviceMonitor`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-servicemonitorconfig[$$ServiceMonitorConfig$$]__ | -| *`module`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-fedmodule[$$FedModule$$]__ | -| *`navItems`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$] array__ | -| *`assetsPrefix`* __string__ | -| *`akamaiCacheBustDisable`* __boolean__ | Akamai cache bust opt-out -| *`akamaiCacheBustPaths`* __string array__ | Files to cache bust +| Field | Description | Default | Validation +| *`disabled`* __boolean__ | | | +| *`envName`* __string__ | | | +| *`title`* __string__ | | | +| *`deploymentRepo`* __string__ | | | +| *`API`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-apiinfo[$$APIInfo$$]__ | | | +| *`frontend`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendinfo[$$FrontendInfo$$]__ | | | +| *`image`* __string__ | | | +| *`service`* __string__ | | | +| *`serviceMonitor`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-servicemonitorconfig[$$ServiceMonitorConfig$$]__ | | | +| *`module`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-fedmodule[$$FedModule$$]__ | | | +| *`navItems`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$] array__ | | | +| *`assetsPrefix`* __string__ | | | +| *`akamaiCacheBustDisable`* __boolean__ | Akamai cache bust opt-out + | | +| *`akamaiCacheBustPaths`* __string array__ | Files to cache bust + | | +| *`searchEntries`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-searchentry[$$SearchEntry$$] array__ | The search index partials for the resource + | | +| *`serviceTiles`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-servicetile[$$ServiceTile$$] array__ | Data for the all services dropdown + | | +| *`widgetRegistry`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetentry[$$WidgetEntry$$] array__ | Data for the available widgets for the resource + | | +| *`replicas`* __integer__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-leafbundlenavitem"] -==== LeafBundleNavItem +==== LeafBundleNavItem + + + + @@ -400,25 +522,54 @@ FrontendSpec defines the desired state of Frontend - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`title`* __string__ | -| *`groupId`* __string__ | -| *`appId`* __string__ | -| *`href`* __string__ | -| *`product`* __string__ | -| *`isExternal`* __boolean__ | -| *`filterable`* __boolean__ | -| *`expandable`* __boolean__ | -| *`notifier`* __string__ | -| *`routes`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-embeddedroute[$$EmbeddedRoute$$] array__ | -| *`permissions`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermission[$$BundlePermission$$] array__ | +| Field | Description | Default | Validation +| *`title`* __string__ | | | +| *`groupId`* __string__ | | | +| *`appId`* __string__ | | | +| *`href`* __string__ | | | +| *`product`* __string__ | | | +| *`isExternal`* __boolean__ | | | +| *`filterable`* __boolean__ | | | +| *`expandable`* __boolean__ | | | +| *`notifier`* __string__ | | | +| *`routes`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-embeddedroute[$$EmbeddedRoute$$] array__ | | | +| *`permissions`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermission[$$BundlePermission$$] array__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-module"] -==== Module +==== Module + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-fedmodule[$$FedModule$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`id`* __string__ | | | +| *`module`* __string__ | | | +| *`routes`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-route[$$Route$$] array__ | | | +| *`dependencies`* __string array__ | | | +| *`optionalDependencies`* __string array__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-moduleconfig"] +==== ModuleConfig + + + + @@ -427,19 +578,20 @@ FrontendSpec defines the desired state of Frontend - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-fedmodule[$$FedModule$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`id`* __string__ | -| *`module`* __string__ | -| *`routes`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-route[$$Route$$] array__ | -| *`dependencies`* __string array__ | -| *`optionalDependencies`* __string array__ | +| Field | Description | Default | Validation +| *`supportCaseData`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-supportcasedata[$$SupportCaseData$$]__ | | | +| *`ssoScopes`* __string array__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-monitoringconfig"] -==== MonitoringConfig +==== MonitoringConfig + + + + @@ -448,16 +600,45 @@ FrontendSpec defines the desired state of Frontend - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendenvironmentspec[$$FrontendEnvironmentSpec$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`mode`* __string__ | -| *`disabled`* __boolean__ | +| Field | Description | Default | Validation +| *`mode`* __string__ | | | Enum: [local app-interface] + + +| *`disabled`* __boolean__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-permission"] +==== Permission + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-route[$$Route$$] +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetconfig[$$WidgetConfig$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`method`* __string__ | | | +| *`apps`* __string array__ | | | +| *`args`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#json-v1-apiextensions-k8s-io[$$JSON$$]__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-route"] -==== Route +==== Route + + + + @@ -466,18 +647,195 @@ FrontendSpec defines the desired state of Frontend - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-module[$$Module$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`pathname`* __string__ | -| *`dynamic`* __boolean__ | -| *`exact`* __boolean__ | -| *`props`* __JSON__ | +| Field | Description | Default | Validation +| *`pathname`* __string__ | | | +| *`dynamic`* __boolean__ | | | +| *`exact`* __boolean__ | | | +| *`props`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#json-v1-apiextensions-k8s-io[$$JSON$$]__ | | | +| *`fullProfile`* __boolean__ | | | +| *`isFedramp`* __boolean__ | | | +| *`supportCaseData`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-supportcasedata[$$SupportCaseData$$]__ | | | +| *`permissions`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-permission[$$Permission$$] array__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-searchentry"] +==== SearchEntry + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`id`* __string__ | | | +| *`href`* __string__ | | | +| *`title`* __string__ | | | +| *`description`* __string__ | | | +| *`alt_title`* __string array__ | | | +| *`isExternal`* __boolean__ | | | |=== [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-servicemonitorconfig"] -==== ServiceMonitorConfig +==== ServiceMonitorConfig + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`disabled`* __boolean__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-servicetile"] +==== ServiceTile + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`section`* __string__ | | | +| *`group`* __string__ | | | +| *`id`* __string__ | | | +| *`href`* __string__ | | | +| *`title`* __string__ | | | +| *`icon`* __string__ | | | +| *`isExternal`* __boolean__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-supportcasedata"] +==== SupportCaseData + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-moduleconfig[$$ModuleConfig$$] +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-route[$$Route$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`version`* __string__ | | | +| *`product`* __string__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetconfig"] +==== WidgetConfig + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetentry[$$WidgetEntry$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`icon`* __string__ | | | +| *`title`* __string__ | | | +| *`permissions`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-permission[$$Permission$$] array__ | | | +| *`headerLink`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetheaderlink[$$WidgetHeaderLink$$]__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetdefaultvariant"] +==== WidgetDefaultVariant + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetdefaults[$$WidgetDefaults$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`w`* __integer__ | | | +| *`h`* __integer__ | | | +| *`maxH`* __integer__ | | | +| *`minH`* __integer__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetdefaults"] +==== WidgetDefaults + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetentry[$$WidgetEntry$$] +**** + +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`sm`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetdefaultvariant[$$WidgetDefaultVariant$$]__ | | | +| *`md`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetdefaultvariant[$$WidgetDefaultVariant$$]__ | | | +| *`lg`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetdefaultvariant[$$WidgetDefaultVariant$$]__ | | | +| *`xl`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetdefaultvariant[$$WidgetDefaultVariant$$]__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetentry"] +==== WidgetEntry + + + + @@ -486,10 +844,35 @@ FrontendSpec defines the desired state of Frontend - xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendspec[$$FrontendSpec$$] **** -[cols="25a,75a", options="header"] +[cols="20a,50a,15a,15a", options="header"] +|=== +| Field | Description | Default | Validation +| *`scope`* __string__ | | | +| *`module`* __string__ | | | +| *`config`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetconfig[$$WidgetConfig$$]__ | | | +| *`defaults`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetdefaults[$$WidgetDefaults$$]__ | | | +|=== + + +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetheaderlink"] +==== WidgetHeaderLink + + + + + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-widgetconfig[$$WidgetConfig$$] +**** + +[cols="20a,50a,15a,15a", options="header"] |=== -| Field | Description -| *`disabled`* __boolean__ | +| Field | Description | Default | Validation +| *`title`* __string__ | | | +| *`href`* __string__ | | | |=== From cc8cdc63673b57990a8c7f50dd3c87225e69ca99 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 13:17:07 -0400 Subject: [PATCH 06/13] Makefile change to fix template build. Removed bogus CRDs --- Makefile | 2 +- .../webapp.test.k8s.elastic.co_embeddeds.yaml | 54 ----- ...webapp.test.k8s.elastic.co_guestbooks.yaml | 223 ------------------ ...ebapp.test.k8s.elastic.co_underlyings.yaml | 47 ---- config/rbac/role.yaml | 199 ---------------- deploy.yml | 200 +--------------- 6 files changed, 2 insertions(+), 723 deletions(-) delete mode 100644 config/crd/bases/webapp.test.k8s.elastic.co_embeddeds.yaml delete mode 100644 config/crd/bases/webapp.test.k8s.elastic.co_guestbooks.yaml delete mode 100644 config/crd/bases/webapp.test.k8s.elastic.co_underlyings.yaml 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 From c49aa84a913fbd65ec8dacc7189e9256cc43d253 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 13:25:26 -0400 Subject: [PATCH 07/13] role.yaml from master --- config/rbac/role.yaml | 173 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index e69de29b..db93e553 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -0,0 +1,173 @@ +--- +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 From 3dc408d83f8fb927e1a8b87369927956d220b3f6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 13:26:09 -0400 Subject: [PATCH 08/13] Updated delpoy --- deploy.yml | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 1 deletion(-) diff --git a/deploy.yml b/deploy.yml index 6418efa2..dcc7fbc9 100644 --- a/deploy.yml +++ b/deploy.yml @@ -1243,6 +1243,178 @@ 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 - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -1289,7 +1461,7 @@ objects: roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: manager-role + name: frontend-operator-manager-role subjects: - kind: ServiceAccount name: frontend-operator-controller-manager From a229b0869691b6c437be4654a7e586062a88d609 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 13:40:27 -0400 Subject: [PATCH 09/13] Change namespace and env for replica test to make it happy --- tests/e2e/replicas/00-create-namespace.yaml | 2 +- tests/e2e/replicas/01-create-resources.yaml | 14 +++++++------- tests/e2e/replicas/02-assert.yaml | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/e2e/replicas/00-create-namespace.yaml b/tests/e2e/replicas/00-create-namespace.yaml index b421aee2..0a69d416 100644 --- a/tests/e2e/replicas/00-create-namespace.yaml +++ b/tests/e2e/replicas/00-create-namespace.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Namespace metadata: - name: test-basic-app + name: test-replicas spec: finalizers: - kubernetes diff --git a/tests/e2e/replicas/01-create-resources.yaml b/tests/e2e/replicas/01-create-resources.yaml index 691cdfc3..7112a2e4 100644 --- a/tests/e2e/replicas/01-create-resources.yaml +++ b/tests/e2e/replicas/01-create-resources.yaml @@ -2,7 +2,7 @@ apiVersion: cloud.redhat.com/v1alpha1 kind: FrontendEnvironment metadata: - name: test-basic-app-environment + name: test-replicas-environment spec: generateNavJSON: false ssl: false @@ -13,7 +13,7 @@ apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend metadata: name: chrome-big - namespace: test-basic-app + namespace: test-replicas spec: replicas: 3 API: @@ -23,7 +23,7 @@ spec: paths: - / deploymentRepo: https://github.com/RedHatInsights/insights-chrome - envName: test-basic-app-environment + envName: test-replicas-environment image: quay.io/cloudservices/insights-chrome-frontend:720317c module: config: @@ -35,7 +35,7 @@ apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend metadata: name: chrome-small - namespace: test-basic-app + namespace: test-replicas spec: replicas: 2 API: @@ -45,7 +45,7 @@ spec: paths: - / deploymentRepo: https://github.com/RedHatInsights/insights-chrome - envName: test-basic-app-environment + envName: test-replicas-environment image: quay.io/cloudservices/insights-chrome-frontend:720317c module: config: @@ -57,7 +57,7 @@ apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend metadata: name: chrome-default - namespace: test-basic-app + namespace: test-replicas spec: API: versions: @@ -66,7 +66,7 @@ spec: paths: - / deploymentRepo: https://github.com/RedHatInsights/insights-chrome - envName: test-basic-app-environment + envName: test-replicas-environment image: quay.io/cloudservices/insights-chrome-frontend:720317c module: config: diff --git a/tests/e2e/replicas/02-assert.yaml b/tests/e2e/replicas/02-assert.yaml index 9e06ae9d..47b245ea 100644 --- a/tests/e2e/replicas/02-assert.yaml +++ b/tests/e2e/replicas/02-assert.yaml @@ -3,7 +3,7 @@ kind: Deployment apiVersion: apps/v1 metadata: name: chrome-frontend - namespace: test-basic-app + namespace: test-replicas labels: frontend: chrome ownerReferences: @@ -20,7 +20,7 @@ spec: volumes: - name: config configMap: - name: test-basic-app-environment + name: test-replicas-environment defaultMode: 420 containers: - name: fe-image @@ -40,7 +40,7 @@ kind: Deployment apiVersion: apps/v1 metadata: name: chrome-small - namespace: test-basic-app + namespace: test-replicas labels: frontend: chrome ownerReferences: @@ -57,7 +57,7 @@ spec: volumes: - name: config configMap: - name: test-basic-app-environment + name: test-replicas-environment defaultMode: 420 containers: - name: fe-image @@ -77,7 +77,7 @@ kind: Deployment apiVersion: apps/v1 metadata: name: chrome-default - namespace: test-basic-app + namespace: test-replicas labels: frontend: chrome ownerReferences: @@ -94,7 +94,7 @@ spec: volumes: - name: config configMap: - name: test-basic-app-environment + name: test-replicas-environment defaultMode: 420 containers: - name: fe-image From db639dc63a7f08e52eda32e598d9247c9c838195 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 13:54:44 -0400 Subject: [PATCH 10/13] Fix kuttl test --- tests/e2e/replicas/02-assert.yaml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/tests/e2e/replicas/02-assert.yaml b/tests/e2e/replicas/02-assert.yaml index 47b245ea..6241ceb9 100644 --- a/tests/e2e/replicas/02-assert.yaml +++ b/tests/e2e/replicas/02-assert.yaml @@ -2,10 +2,10 @@ kind: Deployment apiVersion: apps/v1 metadata: - name: chrome-frontend + name: chrome-big-frontend namespace: test-replicas labels: - frontend: chrome + frontend: chrome-big ownerReferences: - apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend @@ -14,7 +14,7 @@ spec: replicas: 4 selector: matchLabels: - frontend: chrome + frontend: chrome-big template: spec: volumes: @@ -39,19 +39,19 @@ spec: kind: Deployment apiVersion: apps/v1 metadata: - name: chrome-small + name: chrome-small-frontend namespace: test-replicas labels: - frontend: chrome + frontend: chrome-small ownerReferences: - apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend - name: chrome + name: chrome-small spec: replicas: 2 selector: matchLabels: - frontend: chrome + frontend: chrome-small template: spec: volumes: @@ -76,19 +76,19 @@ spec: kind: Deployment apiVersion: apps/v1 metadata: - name: chrome-default + name: chrome-default-frontend namespace: test-replicas labels: - frontend: chrome + frontend: chrome-default ownerReferences: - apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend - name: chrome + name: chrome-default spec: - replicas: 1 + replicas: 2 selector: matchLabels: - frontend: chrome + frontend: chrome-default template: spec: volumes: @@ -109,4 +109,3 @@ spec: volumeMounts: - name: config mountPath: /opt/app-root/src/build/stable/operator-generated - From d7eb5c4fe5f89b50be8841b2d18a611c4eae0014 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 14:05:36 -0400 Subject: [PATCH 11/13] 15 minute oops --- tests/e2e/replicas/02-assert.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/replicas/02-assert.yaml b/tests/e2e/replicas/02-assert.yaml index 6241ceb9..935e893a 100644 --- a/tests/e2e/replicas/02-assert.yaml +++ b/tests/e2e/replicas/02-assert.yaml @@ -11,7 +11,7 @@ metadata: kind: Frontend name: chrome-big spec: - replicas: 4 + replicas: 3 selector: matchLabels: frontend: chrome-big @@ -85,7 +85,7 @@ metadata: kind: Frontend name: chrome-default spec: - replicas: 2 + replicas: 1 selector: matchLabels: frontend: chrome-default From 7ca5e52f9c4b0b41cfa9caf35d4625b09793db08 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 14:22:54 -0400 Subject: [PATCH 12/13] base image bumps --- Dockerfile | 2 +- build/Dockerfile.pr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9c917a1..654f9a90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as base +FROM registry.access.redhat.com/ubi8/go-toolset:1.21.13-1.1727869850 as base WORKDIR /workspace diff --git a/build/Dockerfile.pr b/build/Dockerfile.pr index 48453947..41c6e218 100644 --- a/build/Dockerfile.pr +++ b/build/Dockerfile.pr @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8/go-toolset:1.21 +FROM registry.access.redhat.com/ubi8/go-toolset:1.21.13-1.1727869850 USER 0 RUN dnf install -y openssh-clients git podman make which go jq python3 RUN mkdir /root/go -p From f1d2dcd9a31f7dceb7ea8c9c23eab0f20e6f656d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Oct 2024 15:16:57 -0400 Subject: [PATCH 13/13] Maybe I got this wrong? --- Dockerfile | 2 +- build/Dockerfile.pr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 654f9a90..c7e96a16 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM registry.access.redhat.com/ubi8/go-toolset:1.21.13-1.1727869850 as base +FROM registry.access.redhat.com/ubi8/go-toolset:1.21.13 as base WORKDIR /workspace diff --git a/build/Dockerfile.pr b/build/Dockerfile.pr index 41c6e218..87a4f665 100644 --- a/build/Dockerfile.pr +++ b/build/Dockerfile.pr @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8/go-toolset:1.21.13-1.1727869850 +FROM registry.access.redhat.com/ubi8/go-toolset:1.21.13 USER 0 RUN dnf install -y openssh-clients git podman make which go jq python3 RUN mkdir /root/go -p