From e6e32f720b58a1e75502ce60845fd3cfefef5bb4 Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Mon, 22 Jul 2024 12:09:55 +0100 Subject: [PATCH] Use oc kustomize instead of kustomize to build the docs For not mixing the kustomize versions (CRDs and docs), use oc kustomize for docs Signed-off-by: Fabricio Aguiar --- Makefile | 14 ++++-- ...nstack-operator.clusterserviceversion.yaml | 12 ++++++ docs/assemblies/ctlplane_resources.adoc | 43 +++++++++++++------ docs/assemblies/dataplane_resources.adoc | 5 --- docs/kustomize_to_docs.sh | 4 +- 5 files changed, 53 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index cd133166f..e98191b21 100644 --- a/Makefile +++ b/Makefile @@ -107,9 +107,8 @@ docs-clean: rm -r docs_build .PHONY: docs-examples -docs-kustomize-examples: export KUSTOMIZE_VERSION=v5.0.1 -docs-kustomize-examples: yq kustomize ## Generate updated docs from examples using kustomize - KUSTOMIZE=$(KUSTOMIZE) LOCALBIN=$(LOCALBIN) ./docs/kustomize_to_docs.sh +docs-kustomize-examples: oc yq ## Generate updated docs from examples using kustomize + LOCALBIN=$(LOCALBIN) ./docs/kustomize_to_docs.sh ##@ General @@ -268,6 +267,7 @@ KUSTOMIZE_VERSION ?= v3.8.7 CONTROLLER_TOOLS_VERSION ?= v0.11.1 CRD_MARKDOWN_VERSION ?= v0.0.3 KUTTL_VERSION ?= 0.17.0 +OC_VERSION ?= 4.14.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize @@ -361,11 +361,17 @@ endif endif .PHONY: yq -yq: ## Download and install yq in local env +yq: $(LOCALBIN) ## Download and install yq in local env test -s $(LOCALBIN)/yq || ( cd $(LOCALBIN) &&\ wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64.tar.gz -O - |\ tar xz && mv yq_linux_amd64 $(LOCALBIN)/yq ) +.PHONY: oc +oc: $(LOCALBIN) ## Download and install oc in local env + test -s $(LOCALBIN)/oc || ( cd $(LOCALBIN) &&\ + wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/$(OC_VERSION)/openshift-client-linux-$(OC_VERSION).tar.gz -O - |\ + tar xz) + # Build make variables to export for shell MAKE_ENV := $(shell echo '$(.VARIABLES)' | awk -v RS=' ' '/^(IMAGE)|.*?(REGISTRY)$$/') SHELL_EXPORT = $(foreach v,$(MAKE_ENV),$(v)='$($(v))') diff --git a/config/manifests/bases/openstack-operator.clusterserviceversion.yaml b/config/manifests/bases/openstack-operator.clusterserviceversion.yaml index 229bc6ab0..289b678f2 100644 --- a/config/manifests/bases/openstack-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/openstack-operator.clusterserviceversion.yaml @@ -167,6 +167,11 @@ spec: - description: TLS - overrides tls parameters for public endpoint displayName: TLS path: horizon.apiOverride.tls + - description: Enabled - Whether Horizon services should be deployed and managed + displayName: Enabled + path: horizon.enabled + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - description: Template - Overrides to use when creating the Horizon services displayName: Template path: horizon.template @@ -573,6 +578,13 @@ spec: path: addCertMounts x-descriptors: - urn:alm:descriptor:com.tectonic.ui:booleanSwitch + - description: DeployOnAllNodeSets - should the service be deploy across all + nodesets This will override default target of a service play, setting it + to 'all'. + displayName: Deploy On All Node Sets + path: deployOnAllNodeSets + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:booleanSwitch statusDescriptors: - description: Conditions displayName: Conditions diff --git a/docs/assemblies/ctlplane_resources.adoc b/docs/assemblies/ctlplane_resources.adoc index e7ff8040c..2b44bba49 100644 --- a/docs/assemblies/ctlplane_resources.adoc +++ b/docs/assemblies/ctlplane_resources.adoc @@ -758,6 +758,11 @@ CinderSection defines the desired state of Cinder service | APIOverride, provides the ability to override the generated manifest of several child resources. | <> | false + +| uniquePodNames +| UniquePodNames - Use a unique prefix for cinder CRs to have unique pod names. Convenient to avoid podname (and thus hostname) collision between different deployments. Useful for CI jobs as well as preproduction and production environments that use the same storage backend, etc. +| bool +| true |=== <> @@ -852,6 +857,11 @@ GlanceSection defines the desired state of Glance service | APIOverride, provides the ability to override the generated manifest of several child resources. | map[string]<> | false + +| uniquePodNames +| UniquePodNames - Use a unique prefix for glance CRs to have unique pod names. Convenient to avoid podname (and thus hostname) collision between different deployments. Useful for CI jobs as well as preproduction and production environments that use the same storage backend, etc. +| bool +| true |=== <> @@ -9376,6 +9386,11 @@ GaleraSpec defines the desired state of Galera | When TLS is configured, only allow connections to the DB over TLS | bool | false + +| logToDisk +| Log Galera pod's output to disk +| bool +| true |=== <> @@ -9777,7 +9792,7 @@ NeutronAPISpecCore - | false | defaultConfigOverwrite -| ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json. But can also be used to add additional files. Those get added to the service config dir in /etc/++++++.++++++ +| DefaultConfigOverwrite - interface to overwrite default config files like policy.yaml | map[string]string | false @@ -14825,9 +14840,9 @@ AutoscalingSpecBase - | int32 | false -| prometheusTLS -| If TLS should be used for user deployed prometheus -| *bool +| prometheusTLSCaCertSecret +| If defined, specifies which CA certificate to use for user deployed prometheus +| *corev1.SecretKeySelector | false | heatInstance @@ -15279,6 +15294,16 @@ MetricStorageSpec defines the desired state of MetricStorage |=== | Field | Description | Scheme | Required +| dashboardsEnabled +| DashboardsEnabled allows to enable or disable dashboards and related artifacts +| bool +| true + +| dataplaneNetwork +| DataplaneNetwork defines the network that will be used to scrape dataplane node_exporter endpoints +| infranetworkv1.NetNameStr +| true + | monitoringStack | MonitoringStack allows to define a metric storage with options supported by Red Hat | *<> @@ -15336,21 +15361,11 @@ MonitoringStack defines the options for a Red Hat supported metric storage | bool | true -| dashboardsEnabled -| DashboardsEnabled allows to enable or disable dashboards and related artifacts -| bool -| true - | scrapeInterval | ScrapeInterval sets the interval between scrapes | string | true -| dataplaneNetwork -| DataplaneNetwork defines the network that will be used to scrape dataplane node_exporter endpoints -| infranetworkv1.NetNameStr -| true - | storage | Storage allows to define options for how to store metrics | <> diff --git a/docs/assemblies/dataplane_resources.adoc b/docs/assemblies/dataplane_resources.adoc index aa4e58ad8..19586e6c4 100644 --- a/docs/assemblies/dataplane_resources.adoc +++ b/docs/assemblies/dataplane_resources.adoc @@ -688,11 +688,6 @@ NodeSection defines the top level attributes inherited by nodes in the CR. |=== | Field | Description | Scheme | Required -| extraMounts -| ExtraMounts containing files which can be mounted into an Ansible Execution Pod -| []storage.VolMounts -| false - | networks | Networks - Instance networks | []infranetworkv1.IPSetNetwork diff --git a/docs/kustomize_to_docs.sh b/docs/kustomize_to_docs.sh index 72bdfa66d..3f5f553a9 100755 --- a/docs/kustomize_to_docs.sh +++ b/docs/kustomize_to_docs.sh @@ -5,7 +5,7 @@ BAREMETAL=docs/assemblies/ref_example-OpenStackDataPlaneNodeSet-CR-for-bare-meta FOOTER=$(sed '0,/----/d' $BAREMETAL | sed -e '0,/----/d') sed -i '/----/q' $BAREMETAL sed -i 's/preprovisioned/baremetal/' config/samples/dataplane/no_vars_from/kustomization.yaml -$KUSTOMIZE --load-restrictor LoadRestrictionsNone build config/samples/dataplane/no_vars_from | $LOCALBIN/yq ' select(.kind == "OpenStackDataPlaneNodeSet")' >> $BAREMETAL +$LOCALBIN/oc kustomize --load-restrictor LoadRestrictionsNone config/samples/dataplane/no_vars_from | $LOCALBIN/yq ' select(.kind == "OpenStackDataPlaneNodeSet")' >> $BAREMETAL sed -i 's/\/baremetal/\/preprovisioned/' config/samples/dataplane/no_vars_from/kustomization.yaml echo -e "----\n$FOOTER" >> $BAREMETAL @@ -32,7 +32,7 @@ done PREPROVISIONED=docs/assemblies/ref_example-OpenStackDataPlaneNodeSet-CR-for-preprovisioned-nodes.adoc FOOTER=$(sed '0,/----/d' $PREPROVISIONED | sed -e '0,/----/d') sed -i '/----/q' $PREPROVISIONED -$KUSTOMIZE --load-restrictor LoadRestrictionsNone build config/samples/dataplane/no_vars_from | $LOCALBIN/yq ' select(.kind == "OpenStackDataPlaneNodeSet")' >> $PREPROVISIONED +$LOCALBIN/oc kustomize --load-restrictor LoadRestrictionsNone config/samples/dataplane/no_vars_from | $LOCALBIN/yq ' select(.kind == "OpenStackDataPlaneNodeSet")' >> $PREPROVISIONED echo -e "----\n$FOOTER" >> $PREPROVISIONED COUNT=1