File tree Expand file tree Collapse file tree 11 files changed +378
-8
lines changed
Expand file tree Collapse file tree 11 files changed +378
-8
lines changed Original file line number Diff line number Diff line change 11Azurite
22BarmanObjectStore
3+ BarmanObjectStoreConfiguration
34BarmanObjectStores
45CloudNativePG
6+ EnvVar
57Gi
68IfNotPresent
9+ InstanceSidecarConfiguration
710MinIO
11+ ObjectMeta
12+ ObjectStore
13+ ObjectStoreSpec
14+ ObjectStoreStatus
815PITR
16+ RecoveryWindow
17+ RetentionPolicy
18+ ServerRecoveryWindow
919TLS
1020TODO
1121WAL
2636codebase
2737csi
2838customresourcedefinition
39+ devel
2940externalClusters
3041gcs
3142gf
3748isWALArchiver
3849kubectl
3950kubernetes
51+ md
4052minio
4153namespace
4254namespaces
@@ -47,12 +59,15 @@ postgresql
4759primaryUpdateStrategy
4860rbac
4961rc
62+ recoverability
5063repos
64+ retentionCheckInterval
5165rolebinding
5266sc
5367selfsigned
5468serverName
5569serviceaccount
70+ sig
5671storageClass
5772tfddg
5873tgz
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ plugin for [CloudNativePG](https://cloudnative-pg.io/).
1717 - [ Backup] ( #backup )
1818 - [ Restore] ( #restore )
1919 - [ Replica clusters] ( #replica-clusters )
20+ - [ API Reference] ( #api-reference )
2021
2122## Features
2223
@@ -335,3 +336,8 @@ spec:
335336 parameters:
336337 barmanObjectName: minio-store-b
337338` ` `
339+
340+ # # API Reference
341+
342+ You can find the API reference on its
343+ [dedicated page](./docs/src/plugin-barman-cloud.v1.md).
Original file line number Diff line number Diff line change @@ -69,6 +69,22 @@ tasks:
6969 sources :
7070 - ./**
7171
72+ apidoc :
73+ desc : Update the API Reference section of the documentation
74+ env :
75+ # renovate: datasource=git-refs depName=genref lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
76+ DAGGER_APIDOC_SHA : ac27cc7677fc42ea129fd3c1aa2b2894aad3a246
77+ cmds :
78+ - GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/genref@${DAGGER_APIDOC_SHA} genref --source .
79+ --args "-c=config.yaml" --args "-o=src" --args "-include=plugin-barman-cloud"
80+ file --path src/plugin-barman-cloud.v1.md
81+ export --path docs/src/plugin-barman-cloud.v1.md
82+ sources :
83+ - ./api/**/*.go
84+ - ./docs/config.yaml
85+ generates :
86+ - ./docs/src/plugin-barman-cloud.v1.md
87+
7288 go-test :
7389 desc : Run go test
7490 env :
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ type ObjectStoreSpec struct {
4848 // +optional
4949 RetentionPolicy string `json:"retentionPolicy,omitempty"`
5050
51+ // The configuration for the sidecar that runs in the instance pods
5152 // +optional
5253 InstanceSidecarConfiguration InstanceSidecarConfiguration `json:"instanceSidecarConfiguration,omitempty"`
5354}
@@ -81,7 +82,12 @@ type ObjectStore struct {
8182 metav1.TypeMeta `json:",inline"`
8283 metav1.ObjectMeta `json:"metadata"`
8384
85+ // Specification of the desired behavior of the ObjectStore.
86+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
8487 Spec ObjectStoreSpec `json:"spec"`
88+ // Most recently observed status of the ObjectStore. This data may not be up to
89+ // date. Populated by the system. Read-only.
90+ // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
8591 // +optional
8692 Status ObjectStoreStatus `json:"status,omitempty"`
8793}
Original file line number Diff line number Diff line change 3737 metadata :
3838 type : object
3939 spec :
40- description : ObjectStoreSpec defines the desired state of ObjectStore.
40+ description : |-
41+ Specification of the desired behavior of the ObjectStore.
42+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
4143 properties :
4244 configuration :
4345 description : The configuration for the barman-cloud tool suite
@@ -381,8 +383,8 @@ spec:
381383 - destinationPath
382384 type : object
383385 instanceSidecarConfiguration :
384- description : InstanceSidecarConfiguration defines the configuration
385- for the sidecar that runs in the instance pods.
386+ description : The configuration for the sidecar that runs in the instance
387+ pods
386388 properties :
387389 env :
388390 description : The environment to be explicitly passed to the sidecar
@@ -523,7 +525,10 @@ spec:
523525 - configuration
524526 type : object
525527 status :
526- description : ObjectStoreStatus defines the observed state of ObjectStore.
528+ description : |-
529+ Most recently observed status of the ObjectStore. This data may not be up to
530+ date. Populated by the system. Read-only.
531+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
527532 properties :
528533 serverRecoveryWindow :
529534 additionalProperties :
Original file line number Diff line number Diff line change 1+ hiddenMemberFields :
2+ - " TypeMeta"
3+
4+ externalPackages :
5+ - match : ^k8s\.io/(api|apimachinery/pkg/apis)/
6+ target : https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#{{- lower .TypeIdentifier -}}-{{- arrIndex .PackageSegments -1 -}}-{{- arrIndex .PackageSegments -2 -}}
7+ - match : ^github\.com/cloudnative-pg/barman-cloud
8+ target : https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api/#{{- .TypeIdentifier }}
9+
10+ hideTypePatterns :
11+ - " ParseError$"
12+ - " \\ .ObjectStoreList$"
13+
14+ markdownDisabled : false
15+
16+ stripPrefix :
17+ - k8s.io/api/
18+ - k8s.io/apimachinery/pkg/apis/
19+
20+ apis :
21+ - name : plugin-barman-cloud
22+ title : API Reference
23+ package : github.com/cloudnative-pg/plugin-barman-cloud
24+ path : api/v1
Original file line number Diff line number Diff line change 1+ { { define " members" } }
2+ { {- /* . is a apiType */ -} }
3+ { {- range .GetMembers -} }
4+ { {- /* . is a apiMember */ -} }
5+ { {- if not .Hidden } }
6+ <tr ><td ><code >{ { .FieldName } }</code >
7+ { {- if and (not .IsOptional) (not .IsInline) } } <B >[Required]</B >{ {- end -} }
8+ <br />
9+ { {/* Link for type reference */} }
10+ { {- with .GetType -} }
11+ { {- if .Link -} }
12+ <a href =" { { .Link } } " ><i >{ { .DisplayName } }</i ></a >
13+ { {- else -} }
14+ <i >{ { .DisplayName } }</i >
15+ { {- end -} }
16+ { {- end } }
17+ </td >
18+ <td >
19+ { {- if .IsInline -} }
20+ (Members of <code >{ { .FieldName } }</code > are embedded into this type.)
21+ { {- end } }
22+ { { if .GetComment -} }
23+ { { .GetComment } }
24+ { {- else -} }
25+ <span class =" text-muted" >No description provided.</span >
26+ { {- end } }
27+ { {- if and (eq (.GetType.Name.Name) " ObjectMeta" ) -} }
28+ Refer to the Kubernetes API documentation for the fields of the <code >metadata</code > field.
29+ { {- end -} }
30+ </td >
31+ </tr >
32+ { {- end } }
33+ { {- end } }
34+ { { end } }
Original file line number Diff line number Diff line change 1+ { { define " packages" -} }
2+
3+ # API Reference
4+
5+ { { $grpname := " " -} }
6+ { {- range $idx , $val := .packages -} }
7+ { {- if and (ne .GroupName " " ) (eq $grpname " " ) -} }
8+ { { .GetComment -} }
9+ { {- $grpname = .GroupName -} }
10+ { {- end -} }
11+ { {- end } }
12+
13+ ## Resource Types
14+
15+ { { range .packages -} }
16+ { {- /* if ne .GroupName " " */ -} }
17+ { {- range .VisibleTypes -} }
18+ { {- if .IsExported } }
19+ - [{ { .DisplayName } }]({ { .Link } })
20+ { {- end -} }
21+ { {- end -} }
22+ { {- /* end */ -} }
23+ { {- end -} }
24+
25+ { {- range .packages -} }
26+ { {- if ne .GroupName " " -} }
27+
28+ { {- /* For package with a group name, list all type definitions in it. */ -} }
29+ { {- range .VisibleTypes -} }
30+ { {- if or .Referenced .IsExported -} }
31+ { { template " type" . } }
32+ { {- end -} }
33+ { {- end } }
34+ { {- else -} }
35+ { {- /* For package w/o group name, list only types referenced. */ -} }
36+ { {- range .VisibleTypes -} }
37+ { {- if .Referenced -} }
38+ { { template " type" . } }
39+ { {- end -} }
40+ { {- end } }
41+ { {- end } }
42+ { {- end } }
43+ { {- end } }
Original file line number Diff line number Diff line change 1+ { { define " type" } }
2+
3+ ## { { .Name.Name } } { #{{ .Anchor } }}
4+
5+ { { if eq .Kind " Alias" -} }
6+ (Alias of `{ { .Underlying } }`)
7+ { { end } }
8+
9+ { {- with .References } }
10+ **Appears in:**
11+ { { range . } }
12+ { { if or .Referenced .IsExported -} }
13+ - [{ { .DisplayName } }]({ { .Link } })
14+ { { end -} }
15+ { {- end -} }
16+ { {- end } }
17+
18+ { { if .GetComment -} }
19+ { { .GetComment } }
20+ { { end } }
21+ { { if .GetMembers -} }
22+ <table class =" table" >
23+ <thead ><tr ><th width =" 30%" >Field</th ><th >Description</th ></tr ></thead >
24+ <tbody >
25+ { {- /* . is a apiType */ -} }
26+ { {- if .IsExported -} }
27+ { {- /* Add apiVersion and kind rows if deemed necessary */} }
28+ <tr ><td ><code >apiVersion</code > <B >[Required]</B ><br />string</td ><td ><code >{ {- .APIGroup -} }</code ></td ></tr >
29+ <tr ><td ><code >kind</code > <B >[Required]</B ><br />string</td ><td ><code >{ {- .Name.Name -} }</code ></td ></tr >
30+ { {- end -} }
31+
32+ { {/* The actual list of members is in the following template */} }
33+ { {- template " members" . -} }
34+ </tbody >
35+ </table >
36+ { {- end -} }
37+ { {- end -} }
You can’t perform that action at this time.
0 commit comments