diff --git a/Dockerfile b/Dockerfile index c11fce8d..47443653 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,18 @@ +# Copyright 2017 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. + FROM alpine:3.5 RUN apk update --no-cache && apk add ca-certificates COPY nfs-client-provisioner /nfs-client-provisioner -ENTRYPOINT ["/nfs-client-provisioner"] \ No newline at end of file +ENTRYPOINT ["/nfs-client-provisioner"] diff --git a/README.md b/README.md index ecb1c1c1..5d2638d3 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,4 @@ - check the folder and file "SUCCESS" created - `kubectl delete -f deploy/test-pod.yaml` - `kubectl delete -f deploy/test-claim.yaml` -- check the folder renamed +- check the folder renamed to `archieve-???` diff --git a/build.sh b/build.sh index 3f33f69c..b90b9d36 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,16 @@ #!/bin/sh -CGO_ENABLED=0 go build ./cmd/nfs-client-provisioner #&& docker build -t quay.io/jackieli/nfs-client-provisioner . +# Copyright 2017 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. +CGO_ENABLED=0 go build ./cmd/nfs-client-provisioner #&& docker build -t quay.io/jackieli/nfs-client-provisioner . diff --git a/cmd/nfs-client-provisioner/provisioner.go b/cmd/nfs-client-provisioner/provisioner.go index ded8fae8..06ccefae 100644 --- a/cmd/nfs-client-provisioner/provisioner.go +++ b/cmd/nfs-client-provisioner/provisioner.go @@ -1,3 +1,19 @@ +/* +Copyright 2017 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. +*/ + package main import ( diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index 6595f33d..e7bd5bf1 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -5,7 +5,7 @@ metadata: spec: replicas: 1 strategy: - type: Recreate + type: Recreate template: metadata: labels: @@ -28,4 +28,4 @@ spec: - name: nfs-client-root nfs: server: 10.10.10.60 - path: /ifs/kubernetes \ No newline at end of file + path: /ifs/kubernetes diff --git a/deploy/test-claim.yaml b/deploy/test-claim.yaml index 4382e200..9f7038bd 100644 --- a/deploy/test-claim.yaml +++ b/deploy/test-claim.yaml @@ -9,4 +9,4 @@ spec: - ReadWriteMany resources: requests: - storage: 1Mi \ No newline at end of file + storage: 1Mi diff --git a/deploy/test-pod.yaml b/deploy/test-pod.yaml index c58da791..e5e7b7fe 100644 --- a/deploy/test-pod.yaml +++ b/deploy/test-pod.yaml @@ -18,4 +18,4 @@ spec: volumes: - name: nfs-pvc persistentVolumeClaim: - claimName: test-claim \ No newline at end of file + claimName: test-claim