Skip to content

Commit

Permalink
chore: update to crd generator to v0.0.10 (keptn#2329)
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: realanna <anna.reale@dynatrace.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>
Co-authored-by: odubajDT <ondrej.dubaj@dynatrace.com>
Co-authored-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: David Ahmadov <ahmedavid@gmail.com>
  • Loading branch information
4 people authored and ahmedavid committed Dec 6, 2023
1 parent 534fcf9 commit 5fb555d
Show file tree
Hide file tree
Showing 67 changed files with 2,262 additions and 1,645 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ processor:
ignoreFields:
- "TypeMeta$"
render:
kubernetesVersion: 1.24
kubernetesVersion: 1.28
knownTypes:
- name: ResourceReference
package: github.com/keptn/lifecycle-toolkit/lifecycle-operator/apis/lifecycle/v1alpha3
link: ../v1alpha3/#resourcereference
- name: ItemStatus
package: github.com/keptn/lifecycle-toolkit/lifecycle-operator/apis/lifecycle/v1alpha3
link: ../v1alpha3/#itemstatus
- name: Quantity
package: "k8s.io/apimachinery/pkg/api/resource"
link: https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity
- name: Time
package: "k8s.io/apimachinery/pkg/apis/meta/v1"
link: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Time
- name: Duration
package: "k8s.io/apimachinery/pkg/apis/meta/v1"
link: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration
- name: MapCarrier
package: "go.opentelemetry.io/otel/propagation"
link: https://pkg.go.dev/go.opentelemetry.io/otel/propagation#MapCarrier
15 changes: 14 additions & 1 deletion .github/scripts/generate-crd-docs/crd-docs-generator-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,17 @@ processor:
- "TypeMeta$"
- "EmptyStatus$"
render:
kubernetesVersion: 1.24
kubernetesVersion: 1.28
knownTypes:
- name: Quantity
package: "k8s.io/apimachinery/pkg/api/resource"
link: https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity
- name: Time
package: "k8s.io/apimachinery/pkg/apis/meta/v1"
link: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Time
- name: Duration
package: "k8s.io/apimachinery/pkg/apis/meta/v1"
link: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration
- name: MapCarrier
package: "go.opentelemetry.io/otel/propagation"
link: https://pkg.go.dev/go.opentelemetry.io/otel/propagation#MapCarrier
6 changes: 3 additions & 3 deletions .github/scripts/generate-crd-docs/generate-crd-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Inputs: None

# renovate: datasource=github-releases depName=elastic/crd-ref-docs
GENERATOR_VERSION=v0.0.9
GENERATOR_VERSION=v0.0.10
API_DOMAIN="keptn.sh"
OPERATOR_API_ROOT='lifecycle-operator/apis/'
METRICS_API_ROOT='metrics-operator/api/'
Expand Down Expand Up @@ -71,7 +71,7 @@ for api_group in "$OPERATOR_API_ROOT"*; do
--source-path="./$api_version" \
--renderer="$RENDERER" \
--config "$renderer_config_file" \
--max-depth 10 \
--max-depth 15 \
--output-path "$OUTPUT_PATH/_index.md"
echo "---------------------"
done
Expand Down Expand Up @@ -115,7 +115,7 @@ for api_version in "$METRICS_API_ROOT"*; do
--source-path="./$api_version" \
--renderer="$RENDERER" \
--config "$RENDERER_CONFIG_FILE" \
--max-depth 10 \
--max-depth 15 \
--output-path "$OUTPUT_PATH/_index.md"
echo "---------------------"
done
20 changes: 13 additions & 7 deletions .github/scripts/generate-crd-docs/templates/type.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#### {{ $type.Name }}

{{ if $type.IsAlias }}_Underlying type:_ `{{ markdownRenderTypeLink $type.UnderlyingType }}`{{ end }}
{{ if $type.IsAlias }}_Underlying type:_ _{{ markdownRenderTypeLink $type.UnderlyingType }}_{{ end }}

{{ $type.Doc }}

Expand All @@ -16,18 +16,24 @@ _Appears in:_
{{- end }}

{{ if $type.Members -}}
| Field | Description |
| --- | --- |
| Field | Description | Default | Optional |
| --- | --- | --- | --- |
{{ if $type.GVK -}}
| `apiVersion` _string_ | `{{ $type.GVK.Group }}/{{ $type.GVK.Version }}`
| `kind` _string_ | `{{ $type.GVK.Kind }}`
| `apiVersion` _string_ | `{{ $type.GVK.Group }}/{{ $type.GVK.Version }}` | | |
| `kind` _string_ | `{{ $type.GVK.Kind }}` | | |
{{ end -}}

{{ range $type.Members -}}
| `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} |
| `{{ .Name }}` {{ if .Type.IsAlias }}_{{ markdownRenderTypeLink .Type.UnderlyingType }}_{{else}}_{{ markdownRenderType .Type }}_{{ end }} | {{ template "type_members" . }} |
{{- if index .Markers "kubebuilder:default" -}}
{{- with index (index .Markers "kubebuilder:default") 0 -}}
{{ .Value -}}
{{ end -}}

{{ end -}}
| {{ if index .Markers "optional" }}✓{{ else }}x{{ end }} |
{{ end }}

{{- end -}}
{{- end -}}

{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
{{- if eq $field.Name "metadata" -}}
Refer to Kubernetes API documentation for fields of `metadata`.
{{- else -}}
{{ $field.Doc }}
{{ markdownRenderFieldDoc $field.Doc }}
{{- end -}}
{{- end -}}
Loading

0 comments on commit 5fb555d

Please sign in to comment.