Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimum kube version to CSV & check it against server version #663

Merged
merged 4 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Documentation/design/building-your-csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ It’s common for your Operator to use multiple CRDs to link together concepts,

**Name**: The full name of your CRD

The next two sections require more explanation.
The next two sections require more explanation.

**Resources**:
Your CRDs will own one or more types of Kubernetes objects. These are listed in the resources section to inform your end-users of the objects they might need to troubleshoot or how to connect to the application, such as the Service or Ingress rule that exposes a database.
Expand Down Expand Up @@ -178,7 +178,7 @@ An APIService is uniquely identified by the group-version it provides and can be

**Kind**: A kind that the APIService is expected to provide.

**DeploymentName**:
**DeploymentName**:
Name of the deployment defined by your CSV that corresponds to your APIService (required for owned APIServices). During the CSV pending phase, the OLM Operator will search your CSV's InstallStrategy for a deployment spec with a matching name, and if not found, will not transition the CSV to the install ready phase.

**Resources**:
Expand All @@ -190,8 +190,8 @@ It’s recommended to only list out the objects that are important to a human, n
Essentially the same as for owned CRDs.

### APIService Resource Creation
The Lifecycle Manage is responsible for creating or replacing the Service and APIService resources for each unique owned APIService.
* Service pod selectors are copied from the CSV deployment matching the APIServiceDescription's DeploymentName.
The Lifecycle Manage is responsible for creating or replacing the Service and APIService resources for each unique owned APIService.
* Service pod selectors are copied from the CSV deployment matching the APIServiceDescription's DeploymentName.
* A new CA key/cert pair is generated for for each installation and the base64 encoded CA bundle is embedded in the respective APIService resource.

### APIService Serving Certs
Expand Down Expand Up @@ -232,6 +232,8 @@ The metadata section contains general metadata around the name, version and othe

**Description**: A markdown blob that describes the Operator. Important information to include: features, limitations and common use-cases for the Operator. If your Operator manages different types of installs, eg. standalone vs clustered, it is useful to give an overview of how each differs from each other, or which ones are supported for production use.

**MinKubeVersion**: A minimum version of Kubernetes that server is supposed to have so operator(s) can be deployed.

**Labels** (optional): Any key/value pairs used to organize and categorize this CSV object.

**Selectors** (optional): A label selector to identify related resources. Set this to select on current labels applied to this CSV object (if applicable).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ spec:
type: string
description: Human readable description of what the application does

minKubeVersion:
type: string
description: Minimum kubernetes version requirement on the server to deploy operator

keywords:
type: array
description: List of keywords which will be used to discover and categorize app types
Expand Down Expand Up @@ -198,7 +202,7 @@ spec:
description: Version of the API resource
kind:
type: string
description: Kind of the API resource
description: Kind of the API resource
apiservicedefinitions:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
spec:
displayName: Package Server
description: Represents an Operator package that is available from a given CatalogSource which will resolve to a ClusterServiceVersion.
minKubeVersion: {{ .Values.minKubeVersion }}
keywords: ['packagemanifests', 'olm', 'packages']
maintainers:
- name: Red Hat
Expand Down
1 change: 1 addition & 0 deletions deploy/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ rbacApiVersion: rbac.authorization.k8s.io
namespace: operator-lifecycle-manager
catalog_namespace: operator-lifecycle-manager
operator_namespace: operators
minKubeVersion: 1.11.0
imagestream: false
debug: false
olm:
Expand Down
6 changes: 5 additions & 1 deletion manifests/0000_30_02-clusterserviceversion.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ spec:
type: string
description: Human readable description of what the application does

minKubeVersion:
type: string
description: Minimum kubernetes version requirement on the server to deploy operator

keywords:
type: array
description: List of keywords which will be used to discover and categorize app types
Expand Down Expand Up @@ -200,7 +204,7 @@ spec:
description: Version of the API resource
kind:
type: string
description: Kind of the API resource
description: Kind of the API resource
apiservicedefinitions:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ type ClusterServiceVersionSpec struct {
CustomResourceDefinitions CustomResourceDefinitions `json:"customresourcedefinitions,omitempty"`
APIServiceDefinitions APIServiceDefinitions `json:"apiservicedefinitions,omitempty"`
NativeAPIs []metav1.GroupVersionKind `json:"nativeAPIs,omitempty"`
MinKubeVersion string `json:"minKubeVersion,omitempty"`
DisplayName string `json:"displayName"`
Description string `json:"description,omitempty"`
Keywords []string `json:"keywords,omitempty"`
Expand Down Expand Up @@ -478,3 +479,4 @@ func (csv ClusterServiceVersion) GetOwnedAPIServiceDescriptions() []APIServiceDe

return descs
}

Loading