Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,14 @@ quickstart: manifests #EXHELP Generate the unified installation release manifest
.PHONY: crd-ref-docs
API_REFERENCE_FILENAME := olmv1-api-reference.md
API_REFERENCE_DIR := $(ROOT_DIR)/docs/api-reference
API_REF_TMP := $(API_REFERENCE_DIR)/$(API_REFERENCE_FILENAME).tmp
crd-ref-docs: $(CRD_REF_DOCS) #EXHELP Generate the API Reference Documents.
rm -f $(API_REFERENCE_DIR)/$(API_REFERENCE_FILENAME)
$(CRD_REF_DOCS) --source-path=$(ROOT_DIR)/api/ \
--config=$(API_REFERENCE_DIR)/crd-ref-docs-gen-config.yaml \
--renderer=markdown --output-path=$(API_REFERENCE_DIR)/$(API_REFERENCE_FILENAME);
--renderer=markdown --output-path=$(API_REF_TMP)
go run hack/tools/quick-helm/main.go -values helm/olmv1/values.yaml $(API_REF_TMP) > $(API_REFERENCE_DIR)/$(API_REFERENCE_FILENAME)
rm $(API_REF_TMP)

VENVDIR := $(abspath docs/.venv)

Expand Down
1 change: 1 addition & 0 deletions api/v1/clustercatalog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const (

// ClusterCatalog enables users to make File-Based Catalog (FBC) catalog data available to the cluster.
// For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs
// Please see ClusterCatalog documentation located at {{ .Values.docs.clusterCatalogURL }}
type ClusterCatalog struct {
metav1.TypeMeta `json:",inline"`

Expand Down
1 change: 1 addition & 0 deletions api/v1/clusterextension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ type ClusterExtensionInstallStatus struct {
// +kubebuilder:printcolumn:name=Age,type=date,JSONPath=`.metadata.creationTimestamp`

// ClusterExtension is the Schema for the clusterextensions API
// Please see ClusterExtension documentation located at {{ .Values.docs.clusterExtensionURL }}
type ClusterExtension struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions api/v1/clusterextensionrevision_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ type ClusterExtensionRevisionStatus struct {
// at a time. Ownership of objects is transitioned from one revision to the next as the extension is upgraded
// or reconfigured. Once the latest revision has rolled out successfully, previous active revisions are archived for
// posterity.
// Please see ClusterExtensionRevision documentation located at {{ .Values.docs.clusterExtensionRevisionURL }}
type ClusterExtensionRevision struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions docs/api-reference/olmv1-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ _Appears in:_

ClusterCatalog enables users to make File-Based Catalog (FBC) catalog data available to the cluster.
For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs
Please see ClusterCatalog documentation located at https://www.example.com/ClusterCatalog



Expand Down Expand Up @@ -222,6 +223,7 @@ _Appears in:_


ClusterExtension is the Schema for the clusterextensions API
Please see ClusterExtension documentation located at https://www.example.com/ClusterExtension



Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ require (
golang.org/x/mod v0.30.0
golang.org/x/sync v0.18.0
golang.org/x/tools v0.39.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.19.2
k8s.io/api v0.34.1
k8s.io/apiextensions-apiserver v0.34.1
Expand Down Expand Up @@ -242,7 +243,6 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/controller-manager v0.33.2 // indirect
k8s.io/kubectl v0.34.0 // indirect
oras.land/oras-go/v2 v2.6.0 // indirect
Expand Down
67 changes: 67 additions & 0 deletions hack/tools/quick-helm/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package main

import (
"bytes"
"flag"
"fmt"
"io"
"log"
"os"
"text/template"

"gopkg.in/yaml.v3"
)

// Reads templated documents and does templating based on the inValues, dumps to stdout
func executeTemplate(inValues io.Reader, templates ...string) error {
tpl, err := template.ParseFiles(templates...)
if err != nil {
return fmt.Errorf("error parsing template(s): %v", err)
}

buf := bytes.NewBuffer(nil)
_, err = io.Copy(buf, inValues)
if err != nil {
return fmt.Errorf("failed to read values: %v", err)
}

var values map[string]interface{}
err = yaml.Unmarshal(buf.Bytes(), &values)
if err != nil {
return fmt.Errorf("failed to parse values: %v", err)
}

// Add the .Values to the values that are read, to make it more helm-like
topvalues := map[string]interface{}{
"Values": values,
}
err = tpl.Execute(os.Stdout, topvalues)
if err != nil {
return fmt.Errorf("failed to execute template: %v", err)
}
return nil
}

func main() {
valuesFile := flag.String("values", "", "Path to values YAML file (required)")
flag.Parse()

if *valuesFile == "" {
log.Println("Error: --values flag is required")
flag.Usage()
os.Exit(1)
}

valuesReader, err := os.Open(*valuesFile)
if err != nil {
log.Printf("Failed to open values file: %v\n", err)
os.Exit(1)
}
defer valuesReader.Close()

err = executeTemplate(valuesReader, flag.Args()...)
if err != nil {
log.Println(err)
os.Exit(1)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
description: |-
ClusterCatalog enables users to make File-Based Catalog (FBC) catalog data available to the cluster.
For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs
Please see ClusterCatalog documentation located at {{ .Values.docs.clusterCatalogURL }}
properties:
apiVersion:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
description: |-
ClusterCatalog enables users to make File-Based Catalog (FBC) catalog data available to the cluster.
For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs
Please see ClusterCatalog documentation located at {{ .Values.docs.clusterCatalogURL }}
properties:
apiVersion:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ spec:
at a time. Ownership of objects is transitioned from one revision to the next as the extension is upgraded
or reconfigured. Once the latest revision has rolled out successfully, previous active revisions are archived for
posterity.
Please see ClusterExtensionRevision documentation located at {{ .Values.docs.clusterExtensionRevisionURL }}
properties:
apiVersion:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ spec:
name: v1
schema:
openAPIV3Schema:
description: ClusterExtension is the Schema for the clusterextensions API
description: |-
ClusterExtension is the Schema for the clusterextensions API
Please see ClusterExtension documentation located at {{ .Values.docs.clusterExtensionURL }}
properties:
apiVersion:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ spec:
name: v1
schema:
openAPIV3Schema:
description: ClusterExtension is the Schema for the clusterextensions API
description: |-
ClusterExtension is the Schema for the clusterextensions API
Please see ClusterExtension documentation located at {{ .Values.docs.clusterExtensionURL }}
properties:
apiVersion:
description: |-
Expand Down
5 changes: 5 additions & 0 deletions helm/olmv1/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,8 @@ deployments:
- ALL
readOnlyRootFilesystem: true
terminationMessagePolicy: FallbackToLogsOnError
# Documentation URLs
docs:
clusterExtensionURL: https://www.example.com/ClusterExtension
clusterExtensionRevisionURL: https://www.example.com/ClusterExtensionRevision
clusterCatalogURL: https://www.example.com/ClusterCatalog
6 changes: 5 additions & 1 deletion manifests/experimental-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ spec:
description: |-
ClusterCatalog enables users to make File-Based Catalog (FBC) catalog data available to the cluster.
For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs
Please see ClusterCatalog documentation located at https://www.example.com/ClusterCatalog
properties:
apiVersion:
description: |-
Expand Down Expand Up @@ -660,6 +661,7 @@ spec:
at a time. Ownership of objects is transitioned from one revision to the next as the extension is upgraded
or reconfigured. Once the latest revision has rolled out successfully, previous active revisions are archived for
posterity.
Please see ClusterExtensionRevision documentation located at https://www.example.com/ClusterExtensionRevision
properties:
apiVersion:
description: |-
Expand Down Expand Up @@ -934,7 +936,9 @@ spec:
name: v1
schema:
openAPIV3Schema:
description: ClusterExtension is the Schema for the clusterextensions API
description: |-
ClusterExtension is the Schema for the clusterextensions API
Please see ClusterExtension documentation located at https://www.example.com/ClusterExtension
properties:
apiVersion:
description: |-
Expand Down
6 changes: 5 additions & 1 deletion manifests/experimental.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ spec:
description: |-
ClusterCatalog enables users to make File-Based Catalog (FBC) catalog data available to the cluster.
For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs
Please see ClusterCatalog documentation located at https://www.example.com/ClusterCatalog
properties:
apiVersion:
description: |-
Expand Down Expand Up @@ -625,6 +626,7 @@ spec:
at a time. Ownership of objects is transitioned from one revision to the next as the extension is upgraded
or reconfigured. Once the latest revision has rolled out successfully, previous active revisions are archived for
posterity.
Please see ClusterExtensionRevision documentation located at https://www.example.com/ClusterExtensionRevision
properties:
apiVersion:
description: |-
Expand Down Expand Up @@ -899,7 +901,9 @@ spec:
name: v1
schema:
openAPIV3Schema:
description: ClusterExtension is the Schema for the clusterextensions API
description: |-
ClusterExtension is the Schema for the clusterextensions API
Please see ClusterExtension documentation located at https://www.example.com/ClusterExtension
properties:
apiVersion:
description: |-
Expand Down
5 changes: 4 additions & 1 deletion manifests/standard-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ spec:
description: |-
ClusterCatalog enables users to make File-Based Catalog (FBC) catalog data available to the cluster.
For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs
Please see ClusterCatalog documentation located at https://www.example.com/ClusterCatalog
properties:
apiVersion:
description: |-
Expand Down Expand Up @@ -659,7 +660,9 @@ spec:
name: v1
schema:
openAPIV3Schema:
description: ClusterExtension is the Schema for the clusterextensions API
description: |-
ClusterExtension is the Schema for the clusterextensions API
Please see ClusterExtension documentation located at https://www.example.com/ClusterExtension
properties:
apiVersion:
description: |-
Expand Down
5 changes: 4 additions & 1 deletion manifests/standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ spec:
description: |-
ClusterCatalog enables users to make File-Based Catalog (FBC) catalog data available to the cluster.
For more information on FBC, see https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs
Please see ClusterCatalog documentation located at https://www.example.com/ClusterCatalog
properties:
apiVersion:
description: |-
Expand Down Expand Up @@ -624,7 +625,9 @@ spec:
name: v1
schema:
openAPIV3Schema:
description: ClusterExtension is the Schema for the clusterextensions API
description: |-
ClusterExtension is the Schema for the clusterextensions API
Please see ClusterExtension documentation located at https://www.example.com/ClusterExtension
properties:
apiVersion:
description: |-
Expand Down
Loading