Skip to content

Commit

Permalink
add draft markdown tmpl for CRD docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yorugac committed Dec 17, 2024
1 parent d8ccbdb commit 20cc35d
Show file tree
Hide file tree
Showing 4 changed files with 6,308 additions and 2,081 deletions.
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

0 comments on commit 20cc35d

Please sign in to comment.