From 0b199d9167888e741b5abd00198a797c2ad4f901 Mon Sep 17 00:00:00 2001 From: Maxim Patlasov Date: Tue, 31 Jan 2023 18:24:19 -0800 Subject: [PATCH] UPSTREAM: : Add OpenShift files And remove .github --- .ci-operator.yaml | 4 ++ .github/ISSUE_TEMPLATE/bug-report.md | 25 --------- .github/ISSUE_TEMPLATE/enhancement.md | 18 ------ .github/ISSUE_TEMPLATE/support.md | 15 ----- .github/PULL_REQUEST_TEMPLATE.md | 40 -------------- .github/workflows/codespell.yml | 15 ----- .github/workflows/dependabot.yaml | 20 ------- .github/workflows/trivy.yaml | 55 ------------------- Dockerfile.openshift | 8 +++ ...erfile.snapshot-controller.openshift.rhel7 | 8 +++ Dockerfile.webhook.openshift.rhel7 | 8 +++ OWNERS | 15 +---- OWNERS_ALIASES | 8 ++- 13 files changed, 37 insertions(+), 202 deletions(-) create mode 100644 .ci-operator.yaml delete mode 100644 .github/ISSUE_TEMPLATE/bug-report.md delete mode 100644 .github/ISSUE_TEMPLATE/enhancement.md delete mode 100644 .github/ISSUE_TEMPLATE/support.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/workflows/codespell.yml delete mode 100644 .github/workflows/dependabot.yaml delete mode 100644 .github/workflows/trivy.yaml create mode 100644 Dockerfile.openshift create mode 100644 Dockerfile.snapshot-controller.openshift.rhel7 create mode 100644 Dockerfile.webhook.openshift.rhel7 mode change 120000 => 100644 OWNERS_ALIASES diff --git a/.ci-operator.yaml b/.ci-operator.yaml new file mode 100644 index 000000000..3189dd712 --- /dev/null +++ b/.ci-operator.yaml @@ -0,0 +1,4 @@ +build_root_image: + name: release + namespace: openshift + tag: rhel-8-release-golang-1.19-openshift-4.13 diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index ad0d03f9f..000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Bug Report -about: Create a report to help us improve this project - ---- - - - - -**What happened**: - -**What you expected to happen**: - -**How to reproduce it**: - -**Anything else we need to know?**: - -**Environment**: -- Driver version: -- Kubernetes version (use `kubectl version`): -- OS (e.g. from /etc/os-release): -- Kernel (e.g. `uname -a`): -- Install tools: -- Others: diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md deleted file mode 100644 index a9d33a2af..000000000 --- a/.github/ISSUE_TEMPLATE/enhancement.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Enhancement Request -about: Suggest an idea for this project - ---- - - -**Is your feature request related to a problem?/Why is this needed** - - -**Describe the solution you'd like in detail** - - -**Describe alternatives you've considered** - - -**Additional context** - diff --git a/.github/ISSUE_TEMPLATE/support.md b/.github/ISSUE_TEMPLATE/support.md deleted file mode 100644 index 0400c7bf4..000000000 --- a/.github/ISSUE_TEMPLATE/support.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Support Request -about: Ask questions about this project - ---- - - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index d70526403..000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,40 +0,0 @@ - - -**What type of PR is this?** -> Uncomment only one ` /kind <>` line, hit enter to put that in a new line, and remove leading whitespaces from that line: -> -> /kind api-change -> /kind bug -> /kind cleanup -> /kind design -> /kind documentation -> /kind failing-test -> /kind feature -> /kind flake - -**What this PR does / why we need it**: - -**Which issue(s) this PR fixes**: - -Fixes # - -**Special notes for your reviewer**: - -**Does this PR introduce a user-facing change?**: - -```release-note - -``` diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 8ef8440b0..000000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,15 +0,0 @@ -# GitHub Action to automate the identification of common misspellings in text files. -# https://github.com/codespell-project/actions-codespell -# https://github.com/codespell-project/codespell -name: codespell -on: [push, pull_request] -jobs: - codespell: - name: Check for spelling errors - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: codespell-project/actions-codespell@master - with: - check_filenames: true - skip: ./.git,./.github/workflows/codespell.yml,.git,*.png,*.jpg,*.svg,*.sum,./vendor,go.sum,./release-tools/prow.sh,./client/vendor diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml deleted file mode 100644 index 14632645c..000000000 --- a/.github/workflows/dependabot.yaml +++ /dev/null @@ -1,20 +0,0 @@ -version: 2 -updates: -- package-ecosystem: gomod - directory: "/" - schedule: - interval: daily - labels: - - "area/dependency" - - "release-note-none" - - "ok-to-test" - open-pull-requests-limit: 10 -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - labels: - - "area/dependency" - - "release-note-none" - - "ok-to-test" - open-pull-requests-limit: 10 diff --git a/.github/workflows/trivy.yaml b/.github/workflows/trivy.yaml deleted file mode 100644 index c76105308..000000000 --- a/.github/workflows/trivy.yaml +++ /dev/null @@ -1,55 +0,0 @@ -name: Trivy vulnerability scanner -on: - push: - branches: - - master - pull_request: -jobs: - build: - name: Build - runs-on: ubuntu-18.04 - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install go - uses: actions/setup-go@v2 - with: - go-version: ^1.19 - - - name: Build images from Dockerfile - run: | - make - docker build -t test/csi-snapshotter:latest -f ./cmd/csi-snapshotter/Dockerfile --output=type=docker --label revision=latest . - docker build -t test/snapshot-controller:latest -f ./cmd/snapshot-controller/Dockerfile --output=type=docker --label revision=latest . - docker build -t test/snapshot-validation-webhook:latest -f ./cmd/snapshot-validation-webhook/Dockerfile --output=type=docker --label revision=latest . - - - name: Run Trivy vulnerability scanner on csi-snapshotter image - uses: aquasecurity/trivy-action@master - with: - image-ref: 'test/csi-snapshotter:latest' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN' - - - name: Run Trivy vulnerability scanner on snapshotter-controller image - uses: aquasecurity/trivy-action@master - with: - image-ref: 'test/snapshot-controller:latest' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN' - - - name: Run Trivy vulnerability scanner on snapshot-validation-webhook image - uses: aquasecurity/trivy-action@master - with: - image-ref: 'test/snapshot-validation-webhook:latest' - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: 'CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN' diff --git a/Dockerfile.openshift b/Dockerfile.openshift new file mode 100644 index 000000000..fcb5a3726 --- /dev/null +++ b/Dockerfile.openshift @@ -0,0 +1,8 @@ +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.13 AS builder +WORKDIR /go/src/github.com/kubernetes-csi/external-snapshotter +COPY . . +RUN make build + +FROM registry.ci.openshift.org/ocp/4.13:base +COPY --from=builder /go/src/github.com/kubernetes-csi/external-snapshotter/bin/csi-snapshotter /usr/bin/ +ENTRYPOINT ["/usr/bin/csi-snapshotter"] diff --git a/Dockerfile.snapshot-controller.openshift.rhel7 b/Dockerfile.snapshot-controller.openshift.rhel7 new file mode 100644 index 000000000..2d1cc43d4 --- /dev/null +++ b/Dockerfile.snapshot-controller.openshift.rhel7 @@ -0,0 +1,8 @@ +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.13 AS builder +WORKDIR /go/src/github.com/kubernetes-csi/external-snapshotter +COPY . . +RUN make build + +FROM registry.ci.openshift.org/ocp/4.13:base +COPY --from=builder /go/src/github.com/kubernetes-csi/external-snapshotter/bin/snapshot-controller /usr/bin/ +ENTRYPOINT ["/usr/bin/snapshot-controller"] diff --git a/Dockerfile.webhook.openshift.rhel7 b/Dockerfile.webhook.openshift.rhel7 new file mode 100644 index 000000000..d7cfa287e --- /dev/null +++ b/Dockerfile.webhook.openshift.rhel7 @@ -0,0 +1,8 @@ +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.13 AS builder +WORKDIR /go/src/github.com/kubernetes-csi/external-snapshotter +COPY . . +RUN make build + +FROM registry.ci.openshift.org/ocp/4.13:base +COPY --from=builder /go/src/github.com/kubernetes-csi/external-snapshotter/bin/snapshot-validation-webhook /usr/bin/ +ENTRYPOINT ["/usr/bin/snapshot-validation-webhook"] diff --git a/OWNERS b/OWNERS index 79d2b6846..4f5946c7a 100644 --- a/OWNERS +++ b/OWNERS @@ -1,14 +1,3 @@ -# See the OWNERS docs at https://go.k8s.io/owners - approvers: -- kubernetes-csi-approvers -- jingxu97 -- yuxiangqian - -reviewers: -- kubernetes-csi-reviewers -- jingxu97 -- yuxiangqian - -emeritus_approvers: -- wackxu +- openshift-storage-maintainers +component: "Storage" diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES deleted file mode 120000 index 3f60d4615..000000000 --- a/OWNERS_ALIASES +++ /dev/null @@ -1 +0,0 @@ -release-tools/KUBERNETES_CSI_OWNERS_ALIASES \ No newline at end of file diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES new file mode 100644 index 000000000..0b1d6a9c5 --- /dev/null +++ b/OWNERS_ALIASES @@ -0,0 +1,7 @@ +aliases: + openshift-storage-maintainers: + - jsafrane + - tsmetana + - gnufied + - bertinatto + - dobsonj