Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A sample markdown doc for CRD types #510

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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 @@ -21,7 +21,7 @@ IMG_NAME ?= ghcr.io/grafana/k6-operator
IMG_TAG ?= latest
# Default dockerfile to build
DOCKERFILE ?= "Dockerfile.controller"
CRD_OPTIONS ?= "crd:maxDescLen=0"
CRD_OPTIONS ?= "crd" #:maxDescLen=0"

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -150,6 +150,9 @@ bundle: manifests
bundle-build:
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .

generate-crd-docs:
docker run -u $(id -u):$(id -g) --rm -v ${PWD}:/workdir ghcr.io/fybrik/crdoc:latest --resources /workdir/config/crd/bases --output /workdir/docs/crd-generated.md --template /workdir/docs/crd.tmpl

# ===============================================================
# This section is only about the HELM deployment of the operator
# ===============================================================
Expand Down
17 changes: 11 additions & 6 deletions api/v1alpha1/privateloadzone_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ import (

// PrivateLoadZoneSpec defines the desired state of PrivateLoadZone
type PrivateLoadZoneSpec struct {
Token string `json:"token"`
Resources corev1.ResourceRequirements `json:"resources"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Image string `json:"image,omitempty"`
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// Grafana Cloud k6 token
// +kubebuilder:validation:Type=string
Token string `json:"token"`

Resources corev1.ResourceRequirements `json:"resources"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// +kubebuilder:default="grafana/k6:latest"
Image string `json:"image,omitempty"`
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
}

// PrivateLoadZoneStatus defines the observed state of PrivateLoadZone
Expand All @@ -46,6 +50,7 @@ type PrivateLoadZoneStatus struct {
}

//+kubebuilder:object:root=true
//+kubebuilder:object:generate=true
//+kubebuilder:subresource:status

// PrivateLoadZone is the Schema for the privateloadzones API
Expand Down
Loading
Loading