Skip to content

Commit

Permalink
Adding test to see if registry accepts bundle without default channel
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenislandsong committed May 5, 2020
1 parent b7bc827 commit 890caf6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ metadata:
tectonic-visibility: ocs
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v1.7.0","serviceAccountName":"prometheus-k8s","serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"resources":{"requests":{"memory":"400Mi"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus","prometheus":"k8s"}},"namespaceSelector":{"matchNames":["monitoring"]},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3}}]'
spec:
replaces: prometheusoperator.0.14.0
displayName: Prometheus
description: |
An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
annotations:
alm-examples: '[{"apiVersion":"monitoring.coreos.com/v1","kind":"Prometheus","metadata":{"name":"example","labels":{"prometheus":"k8s"}},"spec":{"replicas":2,"version":"v2.3.2","serviceAccountName":"prometheus-k8s","securityContext": {}, "serviceMonitorSelector":{"matchExpressions":[{"key":"k8s-app","operator":"Exists"}]},"ruleSelector":{"matchLabels":{"role":"prometheus-rulefiles","prometheus":"k8s"}},"alerting":{"alertmanagers":[{"namespace":"monitoring","name":"alertmanager-main","port":"web"}]}}},{"apiVersion":"monitoring.coreos.com/v1","kind":"ServiceMonitor","metadata":{"name":"example","labels":{"k8s-app":"prometheus"}},"spec":{"selector":{"matchLabels":{"k8s-app":"prometheus"}},"endpoints":[{"port":"web","interval":"30s"}]}},{"apiVersion":"monitoring.coreos.com/v1","kind":"Alertmanager","metadata":{"name":"alertmanager-main"},"spec":{"replicas":3, "securityContext": {}}}]'
spec:
replaces: prometheusoperator.0.15.0
replaces: prometheusoperator.0.14.0
displayName: Prometheus Operator
description: |
The Prometheus Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of Prometheus instances.
Expand Down
3 changes: 3 additions & 0 deletions manifests/prometheus/prometheus.package.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
packageName: prometheus
channels:
- name: stable
currentCSV: prometheusoperator.0.15.0
- name: preview
currentCSV: prometheusoperator.0.22.2
defaultChannel: preview
6 changes: 2 additions & 4 deletions test/e2e/opm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ import (
)

var (
packageName = "prometheus"
channels = "preview"
defaultChannel = "preview"
packageName = "prometheus"

bundlePath1 = "manifests/prometheus/0.14.0"
bundlePath2 = "manifests/prometheus/0.15.0"
Expand Down Expand Up @@ -75,7 +73,7 @@ func buildBundlesWith(containerTool string) error {
bundleTag3: bundlePath3,
} {
if err := inTemporaryBuildContext(func() error {
return bundle.BuildFunc(path, "", bundleImage+":"+tag, containerTool, packageName, channels, defaultChannel, false)
return bundle.BuildFunc(path, "", bundleImage+":"+tag, containerTool, "", "", "", false)
}); err != nil {
return err
}
Expand Down

0 comments on commit 890caf6

Please sign in to comment.