Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
Merge b959dbc into 3485a73
Browse files Browse the repository at this point in the history
  • Loading branch information
csomh committed May 3, 2019
2 parents 3485a73 + b959dbc commit 5c784d9
Show file tree
Hide file tree
Showing 17 changed files with 1,230 additions and 22 deletions.
5 changes: 5 additions & 0 deletions example.test.env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ koji_builds:
invalid_zip: invalid-operator-container-1.0.0-1
not_an_operator: etcd-container-1.0.0-1
nested_manifest: operator-container-with-nested-manifest-1.0.0-1
replace_registry: operator-container-with-replaceable-registries-1.0.0-1
# Configuration to test that an organization not configured
# to be made public is kept private.
private_org:
user: <robot account>
password: <robot token>
namespace: private-operators
package: integration-tests-private
# Config of the instance tested to replace registry strings before the push.
replace_registry:
- old: registry.stage.redhat.io
new: registry.redhat.io
54 changes: 54 additions & 0 deletions tests/integration/artifacts/replace_registry/flat/crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: catalogsourceconfigs.marketplace.redhat.com
annotations:
displayName: Catalog Source Config
description: Represents a CatalogSourceConfig. The registry {REGISTRY} is be replaced.
spec:
group: marketplace.redhat.com
names:
kind: CatalogSourceConfig
listKind: CatalogSourceConfigList
plural: catalogsourceconfigs
singular: catalogsourceconfig
shortNames:
- csc
scope: Namespaced
version: v1alpha1
additionalPrinterColumns:
- name: TargetNamespace
type: string
description: The namespace where the operators will be enabled
JSONPath: .spec.targetNamespace
- name: Packages
type: string
description: List of operator(s) which will be enabled in the target namespace
JSONPath: .spec.packages
- name: Status
type: string
description: Current status of the CatalogSourceConfig
JSONPath: .status.currentPhase.phase.name
- name: Message
type: string
description: Message associated with the current status
JSONPath: .status.currentPhase.phase.message
- name: Age
type: date
JSONPath: .metadata.creationTimestamp
validation:
openAPIV3Schema:
properties:
spec:
type: object
description: Spec for a CatalogSourceConfig
required:
- targetNamespace
- packages
properties:
targetNamespace:
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
121 changes: 121 additions & 0 deletions tests/integration/artifacts/replace_registry/flat/csv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#! validate-crd: deploy/chart/templates/0000_30_02-clusterserviceversion.crd.yaml
#! parse-kind: ClusterServiceVersion
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
name: int-test-operator.v0.0.1
namespace: placeholder
spec:
displayName: int-test-operator
description: Short description.
keywords: ['int-test', 'catalog', 'olm', 'admin']
version: 0.0.1
maturity: alpha
maintainers:
- name: AOS Marketplace Team
email: aos-marketplace@redhat.com
provider:
name: Red Hat
labels:
name: int-test-operator
selector:
matchLabels:
name: marketplace-operator
links:
- name: Markplace Operator Source Code
url: https://github.com/operator-framework/operator-marketplace
installModes:
- supported: true
type: OwnNamespace
- supported: true
type: SingleNamespace
- supported: false
type: MultiNamespace
- supported: true
type: AllNamespaces
install:
strategy: deployment
spec:
clusterPermissions:
- serviceAccountName: marketplace-operator
rules:
- apiGroups:
- marketplace.redhat.com
resources:
- "*"
verbs:
- "*"
- apiGroups:
- ""
resources:
- services
- configmaps
verbs:
- "*"
- apiGroups:
- operators.coreos.com
resources:
- catalogsources
verbs:
- "*"
deployments:
- name: marketplace-operator
spec:
replicas: 1
selector:
matchLabels:
name: marketplace-operator
template:
metadata:
name: marketplace-operator
labels:
name: marketplace-operator
spec:
serviceAccountName: marketplace-operator
containers:
- name: marketplace-operator
image: {REGISTRY}/openshift/origin-operator-marketplace:latest
ports:
- containerPort: 60000
name: metrics
- containerPort: 8080
name: healthz
command:
- marketplace-operator
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /healthz
port: 8080
readinessProbe:
httpGet:
path: /healthz
port: 8080
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: "marketplace-operator"
customresourcedefinitions:
owned:
- name: catalogsourceconfigs.marketplace.redhat.com
version: v1alpha1
kind: CatalogSourceConfig
displayName: Catalog Source Config
description: Represents a CatalogSourceConfig object which is used to configure a CatalogSource.
specDescriptors:
- description: The namespace where the operators will be enabled.
displayName: Target Namespace
path: targetNamespace
- description: List of operator(s) which will be enabled in the target namespace
displayName: Packages
path: packages
statusDescriptors:
- description: Current status of the CatalogSourceConfig
displayName: Current Phase Name
path: currentPhase.phase.name
- description: Message associated with the current status
displayName: Current Phase Message
path: currentPhase.phase.message
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! package-manifest: deploy/chart/catalog_resources/rh-operators/marketplace.v0.0.1.clusterserviceversion.yaml
packageName: int-test
channels:
- name: alpha
currentCSV: int-test-operator.v0.0.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: etcdclusters.etcd.database.coreos.com
spec:
group: etcd.database.coreos.com
version: v1beta2
scope: Namespaced
names:
plural: etcdclusters
singular: etcdcluster
kind: EtcdCluster
listKind: EtcdClusterList
shortNames:
- etcdclus
- etcd
Loading

0 comments on commit 5c784d9

Please sign in to comment.