Skip to content

Commit 4fd0709

Browse files
authored
Merge pull request #11 from bswartz/image-name
Change data-source-validator to volume-data-source-validator
2 parents ceb5486 + 0f97a2a commit 4fd0709

File tree

7 files changed

+31
-28
lines changed

7 files changed

+31
-28
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
.PHONY: all data-source-validator clean test
15+
.PHONY: all volume-data-source-validator clean test
1616

17-
CMDS=data-source-validator
17+
CMDS=volume-data-source-validator
1818
all: build
1919

2020
include release-tools/build.make

cmd/data-source-validator/Dockerfile

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM gcr.io/distroless/base:latest
2+
LABEL maintainers="Kubernetes Authors"
3+
LABEL description="Volume Data Source Validator Controller"
4+
ARG binary=./bin/volume-data-source-validator
5+
6+
COPY ${binary} volume-data-source-validator
7+
ENTRYPOINT ["/volume-data-source-validator"]

deploy/kubernetes/rbac-data-source-validator.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
# RBAC file for the data-source-validator controller
1+
# RBAC file for the volume-data-source-validator controller
22
#
3-
# The data-source-validator controller does asynchronous validation of PVC data sources
3+
# The volume-data-source-validator controller does asynchronous validation of PVC data
4+
# sources.
45
# It should be installed as part of the base Kubernetes distribution in an appropriate
56
# namespace for components implementing base system functionality. For installing with
67
# Vanilla Kubernetes, kube-system makes sense for the namespace.
78

89
apiVersion: v1
910
kind: ServiceAccount
1011
metadata:
11-
name: data-source-validator
12+
name: volume-data-source-validator
1213
namespace: kube-system
1314

1415
---
1516
kind: ClusterRole
1617
apiVersion: rbac.authorization.k8s.io/v1
1718
metadata:
18-
name: data-source-validator
19+
name: volume-data-source-validator
1920
rules:
2021
- apiGroups: [populator.storage.k8s.io]
2122
resources: [volumepopulators]
@@ -31,12 +32,12 @@ rules:
3132
kind: ClusterRoleBinding
3233
apiVersion: rbac.authorization.k8s.io/v1
3334
metadata:
34-
name: data-source-validator
35+
name: volume-data-source-validator
3536
subjects:
3637
- kind: ServiceAccount
37-
name: data-source-validator
38+
name: volume-data-source-validator
3839
namespace: kube-system
3940
roleRef:
4041
kind: ClusterRole
41-
name: data-source-validator
42+
name: volume-data-source-validator
4243
apiGroup: rbac.authorization.k8s.io

deploy/kubernetes/setup-data-source-validator.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# This YAML file shows how to deploy the data-source-validator controller
1+
# This YAML file shows how to deploy the volume-data-source-validator controller
22

3-
# The data-source-validator controller does asynchronous validation of PVC data sources
3+
# The volume-data-source-validator controller does asynchronous validation of PVC data
4+
# sources.
45
# It should be installed as part of the base Kubernetes distribution in an appropriate
56
# namespace for components implementing base system functionality. For installing with
67
# Vanilla Kubernetes, kube-system makes sense for the namespace.
@@ -9,23 +10,23 @@
910
kind: StatefulSet
1011
apiVersion: apps/v1
1112
metadata:
12-
name: data-source-validator
13+
name: volume-data-source-validator
1314
namespace: kube-system
1415
spec:
15-
serviceName: data-source-validator
16+
serviceName: volume-data-source-validator
1617
replicas: 1
1718
selector:
1819
matchLabels:
19-
app: data-source-validator
20+
app: volume-data-source-validator
2021
template:
2122
metadata:
2223
labels:
23-
app: data-source-validator
24+
app: volume-data-source-validator
2425
spec:
25-
serviceAccount: data-source-validator
26+
serviceAccount: volume-data-source-validator
2627
containers:
27-
- name: data-source-validator
28-
image: data-source-validator:latest
28+
- name: volume-data-source-validator
29+
image: volume-data-source-validator:latest
2930
args:
3031
- "--v=5"
3132
- "--leader-election=false"

pkg/data-source-validator/data_source_validator.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import (
4040
"k8s.io/klog/v2"
4141

4242
volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1"
43+
4344
popv1alpha1 "github.com/kubernetes-csi/volume-data-source-validator/client/apis/volumepopulator/v1alpha1"
4445
)
4546

@@ -75,7 +76,7 @@ func NewDataSourceValidator(
7576
broadcaster.StartLogging(klog.Infof)
7677
broadcaster.StartRecordingToSink(&corev1.EventSinkImpl{Interface: client.CoreV1().Events(v1.NamespaceAll)})
7778
var eventRecorder record.EventRecorder
78-
eventRecorder = broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: fmt.Sprintf("data-source-validator")})
79+
eventRecorder = broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: fmt.Sprintf("volume-data-source-validator")})
7980

8081
ctrl := &populatorController{
8182
dynClient: dynClient,
@@ -105,8 +106,8 @@ func NewDataSourceValidator(
105106
func (ctrl *populatorController) Run(workers int, stopCh <-chan struct{}) {
106107
defer ctrl.queue.ShutDown()
107108

108-
klog.Infof("Starting data-source-validator controller")
109-
defer klog.Infof("Shutting down data-source-validator controller")
109+
klog.Infof("Starting volume-data-source-validator controller")
110+
defer klog.Infof("Shutting down volume-data-source-validator controller")
110111

111112
if !cache.WaitForCacheSync(stopCh, ctrl.popListerSynced, ctrl.pvcListerSynced) {
112113
klog.Errorf("Cannot sync caches")

0 commit comments

Comments
 (0)