diff --git a/Dockerfile b/Dockerfile index c9c917a1..c7e96a16 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 as base WORKDIR /workspace 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/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 0c0f3a1a..dec29d65 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" 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/build/Dockerfile.pr b/build/Dockerfile.pr index 48453947..87a4f665 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 USER 0 RUN dnf install -y openssh-clients git podman make which go jq python3 RUN mkdir /root/go -p diff --git a/config/crd/bases/cloud.redhat.com_frontends.yaml b/config/crd/bases/cloud.redhat.com_frontends.yaml index d3775354..0f17e58e 100644 --- a/config/crd/bases/cloud.redhat.com_frontends.yaml +++ b/config/crd/bases/cloud.redhat.com_frontends.yaml @@ -304,6 +304,9 @@ spec: - title type: object type: array + replicas: + format: int32 + type: integer searchEntries: description: The search index partials for the resource items: 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) diff --git a/deploy.yml b/deploy.yml index b2fdaa14..dcc7fbc9 100644 --- a/deploy.yml +++ b/deploy.yml @@ -751,6 +751,9 @@ objects: - title type: object type: array + replicas: + format: int32 + type: integer searchEntries: description: The search index partials for the resource items: 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__ | | | |=== diff --git a/tests/e2e/replicas/00-create-namespace.yaml b/tests/e2e/replicas/00-create-namespace.yaml new file mode 100644 index 00000000..0a69d416 --- /dev/null +++ b/tests/e2e/replicas/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-replicas +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..7112a2e4 --- /dev/null +++ b/tests/e2e/replicas/01-create-resources.yaml @@ -0,0 +1,75 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-replicas-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-replicas +spec: + replicas: 3 + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-replicas-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-replicas +spec: + replicas: 2 + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-replicas-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-replicas +spec: + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-replicas-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..935e893a --- /dev/null +++ b/tests/e2e/replicas/02-assert.yaml @@ -0,0 +1,111 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-big-frontend + namespace: test-replicas + labels: + frontend: chrome-big + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-big +spec: + replicas: 3 + selector: + matchLabels: + frontend: chrome-big + template: + spec: + volumes: + - name: config + configMap: + name: test-replicas-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-frontend + namespace: test-replicas + labels: + frontend: chrome-small + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-small +spec: + replicas: 2 + selector: + matchLabels: + frontend: chrome-small + template: + spec: + volumes: + - name: config + configMap: + name: test-replicas-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-frontend + namespace: test-replicas + labels: + frontend: chrome-default + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-default +spec: + replicas: 1 + selector: + matchLabels: + frontend: chrome-default + template: + spec: + volumes: + - name: config + configMap: + name: test-replicas-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