Skip to content

Commit 8709b97

Browse files
committed
add draft markdown tmpl for CRD docs
1 parent bbef6bb commit 8709b97

File tree

4 files changed

+6084
-1925
lines changed

4 files changed

+6084
-1925
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ bundle-build:
135135
generate-crd-docs:
136136
# Generate yamls with full desciption values
137137
$(CONTROLLER_GEN) "crd" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
138-
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
138+
go install fybrik.io/[email protected]
139+
crdoc --resources ./config/crd/bases --output ./docs/crd-generated.md --template ./docs/crd.tmpl
139140
# Restore yamls to the original state
140141
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
141142

api/v1alpha1/privateloadzone_types.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,16 @@ import (
3232

3333
// PrivateLoadZoneSpec defines the desired state of PrivateLoadZone
3434
type PrivateLoadZoneSpec struct {
35-
Token string `json:"token"`
36-
Resources corev1.ResourceRequirements `json:"resources"`
37-
ServiceAccountName string `json:"serviceAccountName,omitempty"`
38-
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
39-
Image string `json:"image,omitempty"`
40-
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
35+
// Grafana Cloud k6 token
36+
// +kubebuilder:validation:Type=string
37+
Token string `json:"token"`
38+
39+
Resources corev1.ResourceRequirements `json:"resources"`
40+
ServiceAccountName string `json:"serviceAccountName,omitempty"`
41+
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
42+
// +kubebuilder:default="grafana/k6:latest"
43+
Image string `json:"image,omitempty"`
44+
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
4145

4246
Config PrivateLoadZoneConfig `json:"config,omitempty"`
4347
}
@@ -48,6 +52,7 @@ type PrivateLoadZoneStatus struct {
4852
}
4953

5054
//+kubebuilder:object:root=true
55+
//+kubebuilder:object:generate=true
5156
//+kubebuilder:subresource:status
5257
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
5358
//+kubebuilder:printcolumn:name="Registered",type="string",JSONPath=".status.conditions[0].status",description="The status of registration"

0 commit comments

Comments
 (0)