-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Csi snapshotter provider changes (#182)
Signed-off-by: sushanthakumar <[email protected]>
- Loading branch information
1 parent
3e776d0
commit 9a0df02
Showing
12 changed files
with
729 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
Copyright 2023 The SODA Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package main | ||
|
||
import ( | ||
"math/rand" | ||
"os" | ||
"time" | ||
|
||
"github.com/soda-cdm/kahu/providers/csi-snapshotter/server" | ||
) | ||
|
||
func main() { | ||
rand.Seed(time.Now().UnixNano()) | ||
|
||
command := server.NewCSISnapshotterProviderCommand() | ||
if err := command.Execute(); err != nil { | ||
os.Exit(1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
deploy/volumeprovider/csi-snapshot-provider-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Copyright 2023 The SODA Authors. | ||
# Copyright 2023 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This mounts the lvm volume claim into /mnt and continuously | ||
# overwrites /mnt/index.html with the time and hostname of the pod. | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kahu-csi-snapshotter-provider | ||
namespace: kahu | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: csi-snapshotter-provider | ||
template: | ||
metadata: | ||
labels: | ||
app: csi-snapshotter-provider | ||
spec: | ||
serviceAccountName: kahu-csi-snapshotter-provider | ||
containers: | ||
- image: sodacdm/kahu-csi-snapshotter-provider:v1.0.0 | ||
imagePullPolicy: IfNotPresent | ||
name: csi-snapshotter-driver | ||
command: ["/usr/local/bin/csi-snapshotter"] | ||
volumeMounts: | ||
- name: socket | ||
mountPath: "/tmp" | ||
- image: sodacdm/kahu-volume-service:v1.0.0 | ||
imagePullPolicy: IfNotPresent | ||
name: volume-service | ||
command: ["/usr/local/bin/volume-service"] | ||
env: | ||
- name: NAME | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.labels['app'] | ||
- name: NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.namespace | ||
volumeMounts: | ||
# name must match the volume name below | ||
- name: socket | ||
mountPath: "/tmp" | ||
volumes: | ||
- name: socket | ||
emptyDir: {} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kahu-csi-snapshotter-provider | ||
namespace: kahu | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
provisioner: kahu | ||
name: kahu-csi-snapshotter-provider-clusterrole-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: kahu-csi-snapshotter-provider-clusterrole | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kahu-csi-snapshotter-provider | ||
namespace: kahu | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
provisioner: kahu | ||
name: kahu-csi-snapshotter-provider-clusterrole | ||
rules: | ||
- apiGroups: ["kahu.io"] | ||
resources: ["providers", "providers/status"] | ||
verbs: ["create", "delete", "watch", "update", "patch", "get", "watch", "list"] | ||
- apiGroups: [ "*" ] | ||
resources: ["*"] | ||
verbs: ["create", "delete", "watch", "update", "patch", "get", "watch", "list"] | ||
--- |
Oops, something went wrong.