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

Generate OLM catalog manifests #5

Merged
merged 2 commits into from Apr 4, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/manager/main.go
Expand Up @@ -12,9 +12,9 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s.io/client-go/rest"

"github.com/Fedosin/csi-driver-manila-operator/pkg/apis"
"github.com/Fedosin/csi-driver-manila-operator/pkg/controller"
"github.com/Fedosin/csi-driver-manila-operator/version"
"github.com/openshift/csi-driver-manila-operator/pkg/apis"
"github.com/openshift/csi-driver-manila-operator/pkg/controller"
"github.com/openshift/csi-driver-manila-operator/version"

"github.com/operator-framework/operator-sdk/pkg/k8sutil"
kubemetrics "github.com/operator-framework/operator-sdk/pkg/kube-metrics"
Expand Down
@@ -0,0 +1,337 @@
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
annotations:
alm-examples: |-
[
{
"apiVersion": "manilacsi.openshift.io/v1alpha1",
"kind": "ManilaCSI",
"metadata": {
"name": "example-manilacsi",
"namespace": "manila-csi"
},
"spec": {
"size": 3
}
}
]
capabilities: Basic Install
name: csi-driver-manila-operator.v0.0.1
namespace: placeholder
spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- description: ManilaCSI is the Schema for the manilacsis API
kind: ManilaCSI
name: manilacsis.manilacsi.openshift.io
version: v1alpha1
description: Placeholder description
displayName: Csi Driver Manila Operator
install:
spec:
clusterPermissions:
- rules:
- apiGroups:
- storage.k8s.io
resources:
- csidrivers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- delete
- get
- watch
- list
- update
- patch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterroles
- clusterrolebindings
- roles
- rolebindings
verbs:
- create
- delete
- get
- watch
- list
- update
- patch
- apiGroups:
- ""
resources:
- persistentvolumes
verbs:
- get
- list
- update
- watch
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- update
- watch
- apiGroups:
- storage.k8s.io
resources:
- volumeattachments
verbs:
- get
- list
- update
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- apiGroups:
- ""
resources:
- persistentvolumes
verbs:
- get
- list
- update
- watch
- create
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- update
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- list
- update
- watch
- create
- patch
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- csinodes
verbs:
- get
- list
- watch
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshotclasses
verbs:
- get
- list
- watch
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshotcontents
verbs:
- create
- get
- list
- watch
- update
- delete
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshots
verbs:
- get
- list
- watch
- update
- apiGroups:
- snapshot.storage.k8s.io
resources:
- volumesnapshots/status
verbs:
- update
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- create
- list
- watch
- delete
- get
- update
serviceAccountName: csi-driver-manila-operator
deployments:
- name: csi-driver-manila-operator
spec:
replicas: 1
selector:
matchLabels:
name: csi-driver-manila-operator
strategy: {}
template:
metadata:
labels:
name: csi-driver-manila-operator
spec:
containers:
- command:
- csi-driver-manila-operator
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: csi-driver-manila-operator
image: quay.io/openshift/origin-csi-driver-manila-operator:latest
imagePullPolicy: Always
name: csi-driver-manila-operator
resources: {}
serviceAccountName: csi-driver-manila-operator
permissions:
- rules:
- apiGroups:
- ""
resources:
- pods
- services
- services/finalizers
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- apiGroups:
- apps
resourceNames:
- csi-driver-manila-operator
resources:
- deployments/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- apps
resources:
- replicasets
- deployments
verbs:
- get
- apiGroups:
- manilacsi.openshift.io
resources:
- '*'
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
serviceAccountName: csi-driver-manila-operator
strategy: deployment
installModes:
- supported: true
type: OwnNamespace
- supported: true
type: SingleNamespace
- supported: false
type: MultiNamespace
- supported: true
type: AllNamespaces
maturity: alpha
provider: {}
replaces: csi-driver-manila-operator.v0.0.0
version: 0.0.1
@@ -0,0 +1,5 @@
channels:
- currentCSV: csi-driver-manila-operator.v0.0.1
name: alpha
defaultChannel: alpha
packageName: csi-driver-manila-operator
2 changes: 1 addition & 1 deletion go.mod
@@ -1,4 +1,4 @@
module github.com/Fedosin/csi-driver-manila-operator
module github.com/openshift/csi-driver-manila-operator

go 1.13

Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/addtoscheme_manilacsi_v1alpha1.go
@@ -1,7 +1,7 @@
package apis

import (
"github.com/Fedosin/csi-driver-manila-operator/pkg/apis/manilacsi/v1alpha1"
"github.com/openshift/csi-driver-manila-operator/pkg/apis/manilacsi/v1alpha1"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/add_manilacsi.go
@@ -1,7 +1,7 @@
package controller

import (
"github.com/Fedosin/csi-driver-manila-operator/pkg/controller/manilacsi"
"github.com/openshift/csi-driver-manila-operator/pkg/controller/manilacsi"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/manilacsi/manila_controllerplugin.go
Expand Up @@ -3,8 +3,8 @@ package manilacsi
import (
"context"

manilacsiv1alpha1 "github.com/Fedosin/csi-driver-manila-operator/pkg/apis/manilacsi/v1alpha1"
"github.com/go-logr/logr"
manilacsiv1alpha1 "github.com/openshift/csi-driver-manila-operator/pkg/apis/manilacsi/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down