Skip to content

Commit 2e65d95

Browse files
camilamacedo86perdasilva
authored andcommitted
doc: fix layout of the doc (#171)
Signed-off-by: Per G. da Silva <[email protected]>
1 parent b2d0084 commit 2e65d95

File tree

6 files changed

+140
-88
lines changed

6 files changed

+140
-88
lines changed

crds/operators.coreos.com_catalogsources.yaml

+13-10
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,26 @@ spec:
5959
address:
6060
description: 'Address is a host that OLM can use to connect to a pre-existing registry. Format: <registry-host or ip>:<port> Only used when SourceType = SourceTypeGrpc. Ignored when the Image field is set.'
6161
type: string
62-
config:
63-
description: Config adds additional optional settings, e.g. catalog source pod node selectors and tolerations
62+
configMap:
63+
description: ConfigMap is the name of the ConfigMap to be used to back a configmap-server registry. Only used when SourceType = SourceTypeConfigmap or SourceTypeInternal.
64+
type: string
65+
description:
66+
type: string
67+
displayName:
68+
description: Metadata
69+
type: string
70+
grpcPodConfig:
71+
description: GrpcPodConfig exposes different overrides for the pod spec of the CatalogSource Pod. Only used when SourceType = SourceTypeGrpc and Image is set.
6472
type: object
6573
properties:
6674
nodeSelector:
6775
description: 'NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node''s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/'
6876
type: object
6977
additionalProperties:
7078
type: string
79+
priorityClassName:
80+
description: If specified, indicates the pod's priority. "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.
81+
type: string
7182
tolerations:
7283
description: Tolerations are the catalog source's pod's tolerations.
7384
type: array
@@ -91,14 +102,6 @@ spec:
91102
value:
92103
description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
93104
type: string
94-
configMap:
95-
description: ConfigMap is the name of the ConfigMap to be used to back a configmap-server registry. Only used when SourceType = SourceTypeConfigmap or SourceTypeInternal.
96-
type: string
97-
description:
98-
type: string
99-
displayName:
100-
description: Metadata
101-
type: string
102105
icon:
103106
type: object
104107
required:

crds/zz_defs.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/operators/v1alpha1/catalogsource_types.go

+14-4
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ type CatalogSourceSpec struct {
8080
// +Optional
8181
Secrets []string `json:"secrets,omitempty"`
8282

83-
// Config adds additional optional settings, e.g. catalog source pod node selectors and tolerations
83+
// GrpcPodConfig exposes different overrides for the pod spec of the CatalogSource Pod.
84+
// Only used when SourceType = SourceTypeGrpc and Image is set.
8485
// +Optional
85-
Config *CatalogSourceConfig `json:"config,omitempty"`
86+
GrpcPodConfig *GrpcPodConfig `json:"grpcPodConfig,omitempty"`
8687

8788
// Metadata
8889
DisplayName string `json:"displayName,omitempty"`
@@ -91,8 +92,8 @@ type CatalogSourceSpec struct {
9192
Icon Icon `json:"icon,omitempty"`
9293
}
9394

94-
// CatalogSourceConfig contains configuration specified for a catalog source
95-
type CatalogSourceConfig struct {
95+
// GrpcPodConfig contains configuration specified for a catalog source
96+
type GrpcPodConfig struct {
9697
// NodeSelector is a selector which must be true for the pod to fit on a node.
9798
// Selector which must match a node's labels for the pod to be scheduled on that node.
9899
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
@@ -102,6 +103,15 @@ type CatalogSourceConfig struct {
102103
// Tolerations are the catalog source's pod's tolerations.
103104
// +optional
104105
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
106+
107+
// If specified, indicates the pod's priority. "system-node-critical" and
108+
// "system-cluster-critical" are two special keywords which indicate the
109+
// highest priorities with the former being the highest priority. Any other
110+
// name must be defined by creating a PriorityClass object with that name.
111+
// If not specified, the pod priority will be default or zero if there is no
112+
// default.
113+
// +optional
114+
PriorityClassName string `json:"priorityClassName,omitempty" protobuf:"bytes,24,opt,name=priorityClassName"`
105115
}
106116

107117
// UpdateStrategy holds all the different types of catalog source update strategies

pkg/operators/v1alpha1/zz_generated.deepcopy.go

+32-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/validation/internal/bundle.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ func validateServiceAccounts(bundle *manifests.Bundle) []errors.Error {
5252
sa := v1.ServiceAccount{}
5353
if err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &sa); err == nil {
5454
if _, ok := saNamesFromCSV[sa.Name]; ok {
55-
errs = append(errs, errors.ErrInvalidBundle(fmt.Sprintf("invalid service account found in bundle. " +
56-
"This service account %s in your bundle is not valid, because a service account with the same name " +
57-
"was already specified in your CSV. If this was unintentional, please remove the service account " +
58-
"manifest from your bundle. If it was intentional to specify a separate service account, " +
59-
"please rename the SA in either the bundle manifest or the CSV.",sa.Name), sa.Name))
55+
errs = append(errs, errors.ErrInvalidBundle(fmt.Sprintf("invalid service account found in bundle. "+
56+
"This service account %s in your bundle is not valid, because a service account with the same name "+
57+
"was already specified in your CSV. If this was unintentional, please remove the service account "+
58+
"manifest from your bundle. If it was intentional to specify a separate service account, "+
59+
"please rename the SA in either the bundle manifest or the CSV.", sa.Name), sa.Name))
6060
}
6161
}
6262
}

pkg/validation/internal/operatorhub.go

+75-36
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,55 @@ import (
2222
// the projects on OperatorHub.io.
2323
//
2424
// This validator will ensure that:
25+
//
2526
// - The annotations capabilities into the CSV has a valid option, which are:
26-
// * "Basic Install"
27-
// * "Seamless Upgrades"
28-
// * "Full Lifecycle"
29-
// * "Deep Insights"
30-
// * "Auto Pilot"
27+
//
28+
// * Basic Install
29+
//
30+
// * Seamless Upgrades
31+
//
32+
// * Full Lifecycle
33+
//
34+
// * Deep Insights
35+
//
36+
// * Auto Pilot
37+
//
3138
// - The annotations categories into the CSV has a valid option, which are:
32-
// * "AI/Machine Learning"
33-
// * "Application Runtime"
34-
// * "Big Data"
35-
// * "Cloud Provider"
36-
// * "Developer Tools"
37-
// * "Database"
38-
// * "Integration & Delivery"
39-
// * "Logging & Tracing"
40-
// * "Modernization & Migration"
41-
// * "Monitoring"
42-
// * "Networking"
43-
// * "OpenShift Optional"
44-
// * "Security"
45-
// * "Storage"
46-
// * "Streaming & Messaging"
47-
//
48-
// NOTE: The operatorhub validator can verify against custom bundle categories by setting the OPERATOR_BUNDLE_CATEGORIES
39+
//
40+
// * AI/Machine Learning
41+
//
42+
// * Application Runtime
43+
//
44+
// * Big Data
45+
//
46+
// * Cloud Provider
47+
//
48+
// * Developer Tools
49+
//
50+
// * Database
51+
//
52+
// * Integration & Delivery
53+
//
54+
// * Logging & Tracing
55+
//
56+
// * Modernization & Migration
57+
//
58+
// * Monitoring
59+
//
60+
// * Networking
61+
//
62+
// * OpenShift Optional
63+
//
64+
// * Security
65+
//
66+
// * Storage
67+
//
68+
// * Streaming & Messaging
69+
//
70+
// NOTE: The OperatorHub validator can verify against custom bundle categories by setting the OPERATOR_BUNDLE_CATEGORIES
4971
// environment variable. Setting the OPERATOR_BUNDLE_CATEGORIES environment variable to the path to a json file
5072
// containing a list of categories will enable those categories to be used when comparing CSV categories for
51-
// operatorhub validation. The json file should be in the following format:
73+
// OperatorHub validation. The json file should be in the following format:
5274
//
5375
// ```json
5476
// {
@@ -60,24 +82,41 @@ import (
6082
// }
6183
// ```
6284
//
63-
// - The csv.Spec.Provider.Name was provided
64-
// - The csv.Spec.Maintainers elements contains both name and email
65-
// - The csv.Spec.Links elements contains both name and url
66-
// - The csv.Spec.Links.Url is a valid value
67-
// - The csv.Spec.Version is provided
68-
// - The checks.csv.Spec.Icon was provided and has not more than one element
69-
// - The csv.Spec.Icon elements should contain both data and mediatype
70-
// - The csv.Spec.Icon elements should contain both data and mediatype
71-
// - The csv.Spec.Icon has a valid mediatype, which are
72-
// * "image/gif"
73-
// * "image/jpeg"
74-
// * "image/png"
75-
// * "image/svg+xml"
85+
// - The `csv.Spec.Provider.Name` was provided
86+
//
87+
// - The `csv.Spec.Maintainers` elements contains both name and email
88+
//
89+
// - The `csv.Spec.Links` elements contains both name and url
90+
//
91+
// - The `csv.Spec.Links.Url` is a valid value
92+
//
93+
// - The `csv.Spec.Version` is provided
94+
//
95+
// - The `csv.Spec.Icon` was provided and has not more than one element
96+
//
97+
// - The `csv.Spec.Icon` elements should contain both data and `mediatype`
98+
//
99+
// - The `csv.Spec.Icon` elements should contain both data and `mediatype`
100+
//
101+
// - The `csv.Spec.Icon` has a valid `mediatype`, which are
102+
//
103+
// * image/gif
104+
//
105+
// * image/jpeg
106+
//
107+
// * image/png
108+
//
109+
// * image/svg+xml
110+
//
76111
// - If informed ONLY, check if the value csv.Spec.MinKubeVersion is parsable according to semver (https://semver.org/)
77112
// Also, this validator will raise warnings when:
113+
//
78114
// - The bundle name (CSV.metadata.name) does not follow the naming convention: <operator-name>.v<semver> e.g. memcached-operator.v0.0.1
115+
//
79116
// NOTE: The bundle name must be 63 characters or less because it will be used as k8s ownerref label which only allows max of 63 characters.
117+
//
80118
// - The channel names seems are not following the convention https://olm.operatorframework.io/docs/best-practices/channel-naming/
119+
//
81120
// - The usage of the removed APIs on Kubernetes 1.22 is found. More info: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22
82121
//
83122
// Note that this validator allows to receive a List of optional values as key=values. Currently, only the

0 commit comments

Comments
 (0)