Skip to content

Commit

Permalink
Merge pull request #20 from huffmanca/include-vsc-by-default
Browse files Browse the repository at this point in the history
Bug 1969538: Include VolumeSnapshotClass by default
  • Loading branch information
openshift-merge-robot committed Jun 10, 2021
2 parents a08d8f0 + adbe473 commit d3a3c29
Show file tree
Hide file tree
Showing 120 changed files with 8,052 additions and 2,946 deletions.
10 changes: 10 additions & 0 deletions assets/volumesnapshotclass.yaml
@@ -0,0 +1,10 @@
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: csi-azuredisk-vsc
annotations:
snapshot.storage.kubernetes.io/is-default-class: "true"
driver: disk.csi.azure.com
deletionPolicy: Delete
parameters:
incremental: "true" # available values: "true", "false" ("true" by default for Azure Public Cloud, and "false" by default for Azure Stack Cloud)
26 changes: 7 additions & 19 deletions go.mod
Expand Up @@ -3,29 +3,17 @@ module github.com/openshift/azure-disk-csi-driver-operator
go 1.15

require (
github.com/Microsoft/go-winio v0.4.11 // indirect
github.com/certifi/gocertifi v0.0.0-20180905225744-ee1a9a0726d2 // indirect
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6 // indirect
github.com/docker/go-connections v0.3.0 // indirect
github.com/docker/libnetwork v0.0.0-20190731215715-7f13a5c99f4b // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/fsouza/go-dockerclient v0.0.0-20171004212419-da3951ba2e9e // indirect
github.com/getsentry/raven-go v0.0.0-20190513200303-c977f96e1095 // indirect
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/runc v0.0.0-20191031171055-b133feaeeb2e // indirect
github.com/openshift/api v0.0.0-20210331193751-3acddb19d360
github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359
github.com/openshift/client-go v0.0.0-20210331195552-cf6c2669e01f
github.com/openshift/library-go v0.0.0-20210408164723-7a65fdb398e2
github.com/openshift/api v0.0.0-20210521075222-e273a339932a
github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e
github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142
github.com/openshift/library-go v0.0.0-20210608075825-51ddcf37b1f8
github.com/prometheus/client_golang v1.7.1
github.com/spf13/cobra v1.1.1
github.com/spf13/pflag v1.0.5
github.com/vishvananda/netlink v1.0.0 // indirect
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect
k8s.io/apimachinery v0.21.0-rc.0
k8s.io/client-go v0.21.0-rc.0
k8s.io/component-base v0.21.0-rc.0
k8s.io/apimachinery v0.21.1
k8s.io/client-go v0.21.1
k8s.io/component-base v0.21.1
k8s.io/klog v1.0.0
)
153 changes: 28 additions & 125 deletions go.sum

Large diffs are not rendered by default.

35 changes: 32 additions & 3 deletions pkg/generated/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pkg/operator/starter.go
Expand Up @@ -14,6 +14,7 @@ import (
configclient "github.com/openshift/client-go/config/clientset/versioned"
configinformers "github.com/openshift/client-go/config/informers/externalversions"
"github.com/openshift/library-go/pkg/controller/controllercmd"
"github.com/openshift/library-go/pkg/controller/factory"
"github.com/openshift/library-go/pkg/operator/csi/csicontrollerset"
"github.com/openshift/library-go/pkg/operator/csi/csidrivercontrollerservicecontroller"
"github.com/openshift/library-go/pkg/operator/csi/csidrivernodeservicecontroller"
Expand All @@ -33,10 +34,12 @@ func RunOperator(ctx context.Context, controllerConfig *controllercmd.Controller
// Create core clientset and informers
kubeClient := kubeclient.NewForConfigOrDie(rest.AddUserAgent(controllerConfig.KubeConfig, operatorName))
kubeInformersForNamespaces := v1helpers.NewKubeInformersForNamespaces(kubeClient, defaultNamespace, "")
nodeInformer := kubeInformersForNamespaces.InformersFor("").Core().V1().Nodes()

// Create config clientset and informer. This is used to get the cluster ID
configClient := configclient.NewForConfigOrDie(rest.AddUserAgent(controllerConfig.KubeConfig, operatorName))
configInformers := configinformers.NewSharedInformerFactory(configClient, 20*time.Minute)
infraInformer := configInformers.Config().V1().Infrastructures()

// Create GenericOperatorclient. This is used by the library-go controllers created down below
gvr := opv1.SchemeGroupVersion.WithResource("clustercsidrivers")
Expand All @@ -59,10 +62,12 @@ func RunOperator(ctx context.Context, controllerConfig *controllercmd.Controller
).WithStaticResourcesController(
"AzureDiskDriverStaticResourcesController",
kubeClient,
dynamicClient,
kubeInformersForNamespaces,
generated.Asset,
[]string{
"storageclass.yaml",
"volumesnapshotclass.yaml",
"controller_sa.yaml",
"node_sa.yaml",
"csidriver.yaml",
Expand Down Expand Up @@ -93,13 +98,18 @@ func RunOperator(ctx context.Context, controllerConfig *controllercmd.Controller
kubeClient,
kubeInformersForNamespaces.InformersFor(defaultNamespace),
configInformers,
[]factory.Informer{
nodeInformer.Informer(),
infraInformer.Informer(),
},
csidrivercontrollerservicecontroller.WithObservedProxyDeploymentHook(),
).WithCSIDriverNodeService(
"AzureDiskDriverNodeServiceController",
generated.MustAsset,
"node.yaml",
kubeClient,
kubeInformersForNamespaces.InformersFor(defaultNamespace),
nil, // Node doesn't need to react to any changes
csidrivernodeservicecontroller.WithObservedProxyDaemonSetHook(),
).WithServiceMonitorController(
"AzureDiskServiceMonitorController",
Expand Down
3 changes: 3 additions & 0 deletions vendor/github.com/openshift/api/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/github.com/openshift/api/apiserver/install.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d3a3c29

Please sign in to comment.