Skip to content

Commit

Permalink
Merge pull request #270 from awgreene/fix-oc-explain
Browse files Browse the repository at this point in the history
Bug 1771277: Implement Structural Schema
  • Loading branch information
openshift-merge-robot committed Dec 5, 2019
2 parents 4b342d2 + 1e75d07 commit a43a232
Show file tree
Hide file tree
Showing 20 changed files with 715 additions and 149 deletions.
107 changes: 81 additions & 26 deletions deploy/crds/operators_v1_operatorsource_crd.yaml
Expand Up @@ -48,43 +48,98 @@ spec:
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
preserveUnknownFields: false
validation:
openAPIV3Schema:
description: OperatorSource is used to define the external datastore we are using to store operator bundles.
description: OperatorSource is used to define the external datastore we are using
to store operator bundles.
properties:
spec:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
metadata:
type: object
description: Spec for an OperatorSource.
required:
- type
- endpoint
- registryNamespace
spec:
description: OperatorSourceSpec defines the desired state of OperatorSource
properties:
type:
authorizationToken:
description: AuthorizationToken is the authorization token used to access
private repositories in remote registry associated with the operator
source.
properties:
secretName:
description: SecretName is the name of the kubernetes Secret object.
type: string
type: object
displayName:
description: DisplayName is passed along to the CatalogSourceConfig
to be used by the resulting CatalogSource to be used as a pretty name.
type: string
description: The type of the OperatorSource
pattern: 'appregistry'
endpoint:
description: Endpoint points to the remote app registry server from
where operator manifests can be fetched.
type: string
description: Points to the remote app registry server from where operator manifests can be fetched.
registryNamespace:
type: string
description: |-
The namespace in app registry.
Only operator manifests under this namespace will be visible.
Please note that this is not a k8s namespace.
publisher:
description: Publisher is passed along to the CatalogSourceConfig to
be used by the resulting CatalogSource that defines what entity published
the artifacts from the OperatorSource.
type: string
description: It represents the entity that published the operator(s) associated with the OperatorSource.
displayName:
registryNamespace:
description: RegistryNamespace refers to the namespace in app registry.
Only operator manifests under this namespace will be visible. Please
note that this is not a k8s namespace.
type: string
description: DisplayName is passed along to the CatalogSourceConfig to be used by the resulting CatalogSource to be used as a pretty name.
authorizationToken:
type: object
description: This is where a user can specify an authorization token that can be used to access private repositories in the remote registry associated with the OperatorSource.
type:
description: Type of operator source.
type: string
type: object
required:
- type
- endpoint
- registryNamespace
status:
description: OperatorSourceStatus defines the observed state of OperatorSource
properties:
currentPhase:
description: Current phase of the OperatorSource object
properties:
secretName:
lastTransitionTime:
description: Last time the object has transitioned from one phase
to another
format: date-time
type: string
description: It is the name of the kubernetes secret object that contains the authorization token to access private repositories.
status:
lastUpdateTime:
description: Last time the status of the object was updated
format: date-time
type: string
phase:
description: Current phase of the object
properties:
message:
description: A human readable message indicating why the object
is in this phase
type: string
name:
description: Name of the phase
type: string
type: object
type: object
packages:
description: Packages is a comma separated list of package(s) each of
which has been downloaded and processed by Marketplace operator from
the specified endpoint.
type: string
type: object
type: object
version: v1
versions:
- name: v1
served: true
storage: true
92 changes: 73 additions & 19 deletions deploy/crds/operators_v2_catalogsourceconfig_crd.yaml
Expand Up @@ -35,35 +35,89 @@ spec:
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
preserveUnknownFields: false
validation:
openAPIV3Schema:
description: CatalogSourceConfig is used to enable an operator present in the OperatorSource to your cluster. Behind the scenes, it will configure an OLM CatalogSource so that the operator can then be managed by OLM.
description: CatalogSourceConfig is used to enable an operator present in the
OperatorSource to your cluster. Behind the scenes, it will configure an OLM
CatalogSource so that the operator can then be managed by OLM.
properties:
spec:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
metadata:
type: object
description: Spec for a CatalogSourceConfig
required:
- targetNamespace
- packages
- source
spec:
description: CatalogSourceConfigSpec defines the desired state of CatalogSourceConfig
properties:
source:
csDisplayName:
description: DisplayName is passed along to the CatalogSource to be
used as a pretty name.
type: string
description: The name of the OperatorSource that the packages originate from
# This pattern accepts valid metadata.name values and empty strings.
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
targetNamespace:
csPublisher:
description: Publisher is passed along to the CatalogSource to be used
to define what entity published the artifacts from the OperatorSource.
type: string
description: The namespace where the operators will be enabled
packages:
type: string
description: Comma separated list of operator(s) without spaces which will be enabled in the target namespace
csDisplayName:
source:
description: The name of the OperatorSource that the packages originate
from
type: string
description: DisplayName is passed along to the CatalogSource to be used as a pretty name.
csPublisher:
targetNamespace:
type: string
description: It represents the entity that published the operator(s) specified in packages.
required:
- packages
- source
- targetNamespace
type: object
status:
description: CatalogSourceConfigStatus defines the observed state of CatalogSourceConfig
properties:
currentPhase:
description: Current phase of the CatalogSourceConfig object.
properties:
lastTransitionTime:
description: Last time the object has transitioned from one phase
to another
format: date-time
type: string
lastUpdateTime:
description: Last time the status of the object was updated
format: date-time
type: string
phase:
description: Current phase of the object
properties:
message:
description: A human readable message indicating why the object
is in this phase
type: string
name:
description: Name of the phase
type: string
type: object
type: object
packageRepositioryVersions:
additionalProperties:
type: string
description: Map of packages (key) and their app registry package version
(value)
type: object
type: object

type: object
version: v2
versions:
- name: v2
served: true
storage: true
- name: v1
served: true
storage: false
91 changes: 73 additions & 18 deletions deploy/upstream/02_catalogsourceconfig.crd.yaml
Expand Up @@ -35,34 +35,89 @@ spec:
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
preserveUnknownFields: false
validation:
openAPIV3Schema:
description: CatalogSourceConfig is used to enable an operator present in the OperatorSource to your cluster. Behind the scenes, it will configure an OLM CatalogSource so that the operator can then be managed by OLM.
description: CatalogSourceConfig is used to enable an operator present in the
OperatorSource to your cluster. Behind the scenes, it will configure an OLM
CatalogSource so that the operator can then be managed by OLM.
properties:
spec:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
metadata:
type: object
description: Spec for a CatalogSourceConfig
required:
- targetNamespace
- packages
- source
spec:
description: CatalogSourceConfigSpec defines the desired state of CatalogSourceConfig
properties:
source:
csDisplayName:
description: DisplayName is passed along to the CatalogSource to be
used as a pretty name.
type: string
description: The name of the OperatorSource that the packages originate from
# This pattern accepts valid metadata.name values and empty strings.
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
targetNamespace:
csPublisher:
description: Publisher is passed along to the CatalogSource to be used
to define what entity published the artifacts from the OperatorSource.
type: string
description: The namespace where the operators will be enabled
packages:
type: string
description: Comma separated list of operator(s) without spaces which will be enabled in the target namespace
csDisplayName:
source:
description: The name of the OperatorSource that the packages originate
from
type: string
description: DisplayName is passed along to the CatalogSource to be used as a pretty name.
csPublisher:
targetNamespace:
type: string
description: It represents the entity that published the operator(s) specified in packages.
required:
- packages
- source
- targetNamespace
type: object
status:
description: CatalogSourceConfigStatus defines the observed state of CatalogSourceConfig
properties:
currentPhase:
description: Current phase of the CatalogSourceConfig object.
properties:
lastTransitionTime:
description: Last time the object has transitioned from one phase
to another
format: date-time
type: string
lastUpdateTime:
description: Last time the status of the object was updated
format: date-time
type: string
phase:
description: Current phase of the object
properties:
message:
description: A human readable message indicating why the object
is in this phase
type: string
name:
description: Name of the phase
type: string
type: object
type: object
packageRepositioryVersions:
additionalProperties:
type: string
description: Map of packages (key) and their app registry package version
(value)
type: object
type: object
type: object
version: v2
versions:
- name: v2
served: true
storage: true
- name: v1
served: true
storage: false

0 comments on commit a43a232

Please sign in to comment.