Skip to content

Commit

Permalink
Merge pull request #431 from tmjd/pick-426-render-nice-r1.0
Browse files Browse the repository at this point in the history
Update api comments so they render nicely (r1.0)
  • Loading branch information
tmjd authored Mar 2, 2020
2 parents 1d11a28 + 2a5c220 commit 1c39e08
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 48 deletions.
19 changes: 9 additions & 10 deletions deploy/crds/operator_v1_installation_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ spec:
metadata:
type: object
spec:
description: Specification of the desired state for the Calico or Tigera
Secure EE installation.
description: Specification of the desired state for the Calico or Calico
Enterprise installation.
properties:
calicoNetwork:
description: CalicoNetwork specifies configuration options for Calico
Expand Down Expand Up @@ -86,9 +86,8 @@ spec:
description: 'ImagePath allows for the path part of an image to be specified.
If specified then the specified value will be used as the image path
for each image. If not specified or empty, the default for each image
will be used. Image format: <registry>/<imagePath>/<imageName>:<tag-name>
This option allows configuring the <imagePath> portion of the above
format.'
will be used. Image format: `<registry>/<imagePath>/<imageName>:<tag-name>` This
option allows configuring the `<imagePath>` portion of the above format.'
type: string
imagePullSecrets:
description: ImagePullSecrets is an array of references to container
Expand All @@ -112,9 +111,9 @@ spec:
registry:
description: 'Registry is the default Docker registry used for component
Docker images. If specified, all images will be pulled from this registry.
If not specified then the default registries will be used. Image format: <registry>/<imagePath>/<imageName>:<tag-name>
This option allows configuring the <registry> portion of the above
format.'
If not specified then the default registries will be used. Image
format: `<registry>/<imagePath>/<imageName>:<tag-name>` This option
allows configuring the `<registry>` portion of the above format.'
type: string
variant:
description: 'Variant is the product to install - one of Calico or TigeraSecureEnterprise
Expand All @@ -125,8 +124,8 @@ spec:
type: string
type: object
status:
description: Most recently observed state for the Calico or Tigera Secure
EE installation.
description: Most recently observed state for the Calico or Calico Enterprise
installation.
properties:
variant:
description: Variant is the most recently observed installed variant
Expand Down
8 changes: 4 additions & 4 deletions deploy/crds/operator_v1_manager_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ spec:
metadata:
type: object
spec:
description: Specification of the desired state for the Tigera Secure EE
description: Specification of the desired state for the Calico Enterprise
manager.
properties:
auth:
description: Auth defines the authentication strategy for the Tigera
Secure manager GUI.
description: Auth defines the authentication strategy for the Calico
Enterprise manager GUI.
properties:
authority:
description: Authority configures the OAuth2/OIDC authority/issuer
Expand All @@ -55,7 +55,7 @@ spec:
type: object
type: object
status:
description: Most recently observed state for the Tigera Secure EE manager.
description: Most recently observed state for the Calico Enterprise manager.
properties:
auth:
description: The last successfully applied authentication configuration.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/operator/v1/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// API Schema definitions for configuring the installation of Calico and Tigera Secure EE
// API Schema definitions for configuring the installation of Calico and Calico Enterprise
// +k8s:deepcopy-gen=package,register
// +groupName=operator.tigera.io
package v1
2 changes: 1 addition & 1 deletion pkg/apis/operator/v1/logstorage_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type Retention struct {

// LogStorage installs the components required for Tigera flow and DNS log storage. At most one instance
// of this resource is supported. It must be named "tigera-secure". When created, this installs an Elasticsearch cluster for use by
// Tigera Secure.
// Calico Enterprise.
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
type LogStorage struct {
Expand Down
12 changes: 6 additions & 6 deletions pkg/apis/operator/v1/manager_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// ManagerSpec defines configuration for the Tigera Secure manager GUI.
// ManagerSpec defines configuration for the Calico Enterprise manager GUI.
// +k8s:openapi-gen=true
type ManagerSpec struct {
// Auth defines the authentication strategy for the Tigera Secure manager GUI.
// Auth defines the authentication strategy for the Calico Enterprise manager GUI.
// +optional
Auth *Auth `json:"auth,omitempty"`
}

// ManagerStatus defines the observed state of the Tigera Secure manager GUI.
// ManagerStatus defines the observed state of the Calico Enterprise manager GUI.
// +k8s:openapi-gen=true
type ManagerStatus struct {
// The last successfully applied authentication configuration.
Expand Down Expand Up @@ -52,18 +52,18 @@ const (
// +genclient
// +genclient:nonNamespaced

// Manager installs the Tigera Secure manager graphical user interface. At most one instance
// Manager installs the Calico Enterprise manager graphical user interface. At most one instance
// of this resource is supported. It must be named "tigera-secure".
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
type Manager struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

// Specification of the desired state for the Tigera Secure EE manager.
// Specification of the desired state for the Calico Enterprise manager.
Spec ManagerSpec `json:"spec,omitempty"`

// Most recently observed state for the Tigera Secure EE manager.
// Most recently observed state for the Calico Enterprise manager.
Status ManagerStatus `json:"status,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/operator/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

// NOTE: Boilerplate only. Ignore this file.

// API Schema definitions for configuring the installation of Calico and Tigera Secure EE
// API Schema definitions for configuring the installation of Calico and Calico Enterprise
// +k8s:deepcopy-gen=package,register
// +groupName=operator.tigera.io
package v1
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/operator/v1/tigerastatus_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type TigeraStatusStatus struct {
// +genclient
// +genclient:nonNamespaced

// TigeraStatus represents the most recently observed status for Calico or a Tigera Secure EE functional area.
// TigeraStatus represents the most recently observed status for Calico or a Calico Enterprise functional area.
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=="Available")].status",description="Whether the component running and stable."
Expand Down
22 changes: 13 additions & 9 deletions pkg/apis/operator/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// InstallationSpec defines configuration for a Calico or Tigera Secure EE installation.
// InstallationSpec defines configuration for a Calico or Calico Enterprise installation.
// +k8s:openapi-gen=true
type InstallationSpec struct {
// Variant is the product to install - one of Calico or TigeraSecureEnterprise
Expand All @@ -31,18 +31,22 @@ type InstallationSpec struct {
// Registry is the default Docker registry used for component Docker images. If specified,
// all images will be pulled from this registry. If not specified then the default registries
// will be used.
//
// Image format:
// <registry>/<imagePath>/<imageName>:<tag-name>
// This option allows configuring the <registry> portion of the above format.
// `<registry>/<imagePath>/<imageName>:<tag-name>`
//
// This option allows configuring the `<registry>` portion of the above format.
// +optional
Registry string `json:"registry,omitempty"`

// ImagePath allows for the path part of an image to be specified. If specified
// then the specified value will be used as the image path for each image. If not specified
// or empty, the default for each image will be used.
//
// Image format:
// <registry>/<imagePath>/<imageName>:<tag-name>
// This option allows configuring the <imagePath> portion of the above format.
// `<registry>/<imagePath>/<imageName>:<tag-name>`
//
// This option allows configuring the `<imagePath>` portion of the above format.
// +optional
ImagePath string `json:"imagePath,omitempty"`

Expand Down Expand Up @@ -181,7 +185,7 @@ type IPPool struct {
BlockSize *int32 `json:"blockSize,omitempty"`
}

// InstallationStatus defines the observed state of the Calico or Tigera Secure installation.
// InstallationStatus defines the observed state of the Calico or Calico Enterprise installation.
// +k8s:openapi-gen=true
type InstallationStatus struct {
// Variant is the most recently observed installed variant - one of Calico or TigeraSecureEnterprise
Expand All @@ -193,7 +197,7 @@ type InstallationStatus struct {
// +genclient
// +genclient:nonNamespaced

// Installation configures an installation of Calico or Tigera Secure EE. At most one instance
// Installation configures an installation of Calico or Calico Enterprise. At most one instance
// of this resource is supported. It must be named "default". The Installation API installs core networking
// and network policy components, and provides general install-time configuration.
// +k8s:openapi-gen=true
Expand All @@ -202,10 +206,10 @@ type Installation struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

// Specification of the desired state for the Calico or Tigera Secure EE installation.
// Specification of the desired state for the Calico or Calico Enterprise installation.
Spec InstallationSpec `json:"spec,omitempty"`

// Most recently observed state for the Calico or Tigera Secure EE installation.
// Most recently observed state for the Calico or Calico Enterprise installation.
Status InstallationStatus `json:"status,omitempty"`
}

Expand Down
30 changes: 15 additions & 15 deletions pkg/apis/operator/v1/zz_generated.openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func schema_pkg_apis_operator_v1_Installation(ref common.ReferenceCallback) comm
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "Installation configures an installation of Calico or Tigera Secure EE. At most one instance of this resource is supported. It must be named \"default\". The Installation API installs core networking and network policy components, and provides general install-time configuration.",
Description: "Installation configures an installation of Calico or Calico Enterprise. At most one instance of this resource is supported. It must be named \"default\". The Installation API installs core networking and network policy components, and provides general install-time configuration.",
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Expand All @@ -255,13 +255,13 @@ func schema_pkg_apis_operator_v1_Installation(ref common.ReferenceCallback) comm
},
"spec": {
SchemaProps: spec.SchemaProps{
Description: "Specification of the desired state for the Calico or Tigera Secure EE installation.",
Description: "Specification of the desired state for the Calico or Calico Enterprise installation.",
Ref: ref("github.com/tigera/operator/pkg/apis/operator/v1.InstallationSpec"),
},
},
"status": {
SchemaProps: spec.SchemaProps{
Description: "Most recently observed state for the Calico or Tigera Secure EE installation.",
Description: "Most recently observed state for the Calico or Calico Enterprise installation.",
Ref: ref("github.com/tigera/operator/pkg/apis/operator/v1.InstallationStatus"),
},
},
Expand All @@ -277,7 +277,7 @@ func schema_pkg_apis_operator_v1_InstallationSpec(ref common.ReferenceCallback)
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "InstallationSpec defines configuration for a Calico or Tigera Secure EE installation.",
Description: "InstallationSpec defines configuration for a Calico or Calico Enterprise installation.",
Properties: map[string]spec.Schema{
"variant": {
SchemaProps: spec.SchemaProps{
Expand All @@ -288,14 +288,14 @@ func schema_pkg_apis_operator_v1_InstallationSpec(ref common.ReferenceCallback)
},
"registry": {
SchemaProps: spec.SchemaProps{
Description: "Registry is the default Docker registry used for component Docker images. If specified, all images will be pulled from this registry. If not specified then the default registries will be used. Image format:\n <registry>/<imagePath>/<imageName>:<tag-name>\nThis option allows configuring the <registry> portion of the above format.",
Description: "Registry is the default Docker registry used for component Docker images. If specified, all images will be pulled from this registry. If not specified then the default registries will be used.\n\nImage format:\n `<registry>/<imagePath>/<imageName>:<tag-name>`\n\nThis option allows configuring the `<registry>` portion of the above format.",
Type: []string{"string"},
Format: "",
},
},
"imagePath": {
SchemaProps: spec.SchemaProps{
Description: "ImagePath allows for the path part of an image to be specified. If specified then the specified value will be used as the image path for each image. If not specified or empty, the default for each image will be used. Image format:\n <registry>/<imagePath>/<imageName>:<tag-name>\nThis option allows configuring the <imagePath> portion of the above format.",
Description: "ImagePath allows for the path part of an image to be specified. If specified then the specified value will be used as the image path for each image. If not specified or empty, the default for each image will be used.\n\nImage format:\n `<registry>/<imagePath>/<imageName>:<tag-name>`\n\nThis option allows configuring the `<imagePath>` portion of the above format.",
Type: []string{"string"},
Format: "",
},
Expand Down Expand Up @@ -338,7 +338,7 @@ func schema_pkg_apis_operator_v1_InstallationStatus(ref common.ReferenceCallback
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "InstallationStatus defines the observed state of the Calico or Tigera Secure installation.",
Description: "InstallationStatus defines the observed state of the Calico or Calico Enterprise installation.",
Properties: map[string]spec.Schema{
"variant": {
SchemaProps: spec.SchemaProps{
Expand Down Expand Up @@ -526,7 +526,7 @@ func schema_pkg_apis_operator_v1_LogStorage(ref common.ReferenceCallback) common
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "LogStorage installs the components required for Tigera flow and DNS log storage. At most one instance of this resource is supported. It must be named \"tigera-secure\". When created, this installs an Elasticsearch cluster for use by Tigera Secure.",
Description: "LogStorage installs the components required for Tigera flow and DNS log storage. At most one instance of this resource is supported. It must be named \"tigera-secure\". When created, this installs an Elasticsearch cluster for use by Calico Enterprise.",
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Expand Down Expand Up @@ -637,7 +637,7 @@ func schema_pkg_apis_operator_v1_Manager(ref common.ReferenceCallback) common.Op
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "Manager installs the Tigera Secure manager graphical user interface. At most one instance of this resource is supported. It must be named \"tigera-secure\".",
Description: "Manager installs the Calico Enterprise manager graphical user interface. At most one instance of this resource is supported. It must be named \"tigera-secure\".",
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Expand All @@ -660,13 +660,13 @@ func schema_pkg_apis_operator_v1_Manager(ref common.ReferenceCallback) common.Op
},
"spec": {
SchemaProps: spec.SchemaProps{
Description: "Specification of the desired state for the Tigera Secure EE manager.",
Description: "Specification of the desired state for the Calico Enterprise manager.",
Ref: ref("github.com/tigera/operator/pkg/apis/operator/v1.ManagerSpec"),
},
},
"status": {
SchemaProps: spec.SchemaProps{
Description: "Most recently observed state for the Tigera Secure EE manager.",
Description: "Most recently observed state for the Calico Enterprise manager.",
Ref: ref("github.com/tigera/operator/pkg/apis/operator/v1.ManagerStatus"),
},
},
Expand All @@ -682,11 +682,11 @@ func schema_pkg_apis_operator_v1_ManagerSpec(ref common.ReferenceCallback) commo
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "ManagerSpec defines configuration for the Tigera Secure manager GUI.",
Description: "ManagerSpec defines configuration for the Calico Enterprise manager GUI.",
Properties: map[string]spec.Schema{
"auth": {
SchemaProps: spec.SchemaProps{
Description: "Auth defines the authentication strategy for the Tigera Secure manager GUI.",
Description: "Auth defines the authentication strategy for the Calico Enterprise manager GUI.",
Ref: ref("github.com/tigera/operator/pkg/apis/operator/v1.Auth"),
},
},
Expand All @@ -702,7 +702,7 @@ func schema_pkg_apis_operator_v1_ManagerStatus(ref common.ReferenceCallback) com
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "ManagerStatus defines the observed state of the Tigera Secure manager GUI.",
Description: "ManagerStatus defines the observed state of the Calico Enterprise manager GUI.",
Properties: map[string]spec.Schema{
"auth": {
SchemaProps: spec.SchemaProps{
Expand Down Expand Up @@ -757,7 +757,7 @@ func schema_pkg_apis_operator_v1_TigeraStatus(ref common.ReferenceCallback) comm
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "TigeraStatus represents the most recently observed status for Calico or a Tigera Secure EE functional area.",
Description: "TigeraStatus represents the most recently observed status for Calico or a Calico Enterprise functional area.",
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Expand Down

0 comments on commit 1c39e08

Please sign in to comment.