Skip to content

Commit

Permalink
Merge pull request #48 from red-hat-storage/sync_ds--main
Browse files Browse the repository at this point in the history
Syncing latest changes from main for cephcsi-operator
  • Loading branch information
openshift-merge-bot[bot] authored Nov 11, 2024
2 parents 02a4bbf + 5930b17 commit 24cfebf
Show file tree
Hide file tree
Showing 18 changed files with 416 additions and 54 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Assign issue to contributor
on:
issue_comment:
types: [created, edited]

permissions:
contents: read

jobs:
assign:
permissions:
# write permissions are needed to assign the issue.
issues: write
name: Run self assign job
runs-on: ubuntu-latest
steps:
- name: take the issue
uses: bdougie/take-action@1439165ac45a7461c2d89a59952cd7d941964b87 # main
with:
message: Thanks for taking this issue! Let us know if you have any questions!
trigger: /assign
token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
25 changes: 25 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ jobs:
- name: govulncheck
uses: golang/govulncheck-action@v1

markdownlint:
name: markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: DavidAnson/markdownlint-cli2-action@v17
with:
config: .markdownlint.yaml
globs: 'docs/*.md'

shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
Expand All @@ -91,3 +103,16 @@ jobs:
ignore_paths: 'vendor'
disable_matcher: false
format: gcc

modcheck:
name: modcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: run mod check
run: make mod.check
46 changes: 46 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Mark or close stale issues and PRs
# based on the rook workflow:
# https://github.com/rook/rook/blob/master/.github/workflows/stale.yaml

name: "Mark or close stale issues and PRs"
on:
schedule:
# Run the stalebot every day at 8pm UTC
- cron: "00 20 * * *"

permissions:
contents: read

jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-22.04
if: github.repository == 'ceph/ceph-csi-operator'
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 60
days-before-pr-stale: 30
days-before-close: 7
days-before-pr-close: 14
stale-issue-message: >
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in a week if no further activity occurs.
Thank you for your contributions.
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed in two weeks if no further activity occurs.
Thank you for your contributions.
close-issue-message: >
This issue has been automatically closed due to inactivity.
Please re-open if this still requires investigation.
close-pr-message: >
This pull request has been automatically closed due to inactivity.
Please re-open if these changes are still required.
stale-pr-label: "stale"
stale-issue-label: "wontfix"
exempt-issue-labels: "keepalive,security,reliability"
exempt-pr-labels: "keepalive,security,reliability"
16 changes: 16 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
MD010: false # Hard tabs
MD012: false # Multiple consecutive blank lines
MD013: false # Line length
MD019: false # Multiple spaces after hash on atx style heading
MD021: false # Multiple spaces inside hashes on closed atx style heading
MD022: false # Headings should be surrounded by blank lines
MD024: false # Multiple headings with the same content
MD025: false # Multiple top-level headings in the same document
MD027: false # Multiple spaces after blockquote symbol
MD030: false # Spaces after list markers
MD031: false # Fenced code blocks should be surrounded by blank lines
MD032: false # Lists should be surrounded by blank lines
MD041: false # First line in a file should be a top-level heading
MD043: false # Required heading structure
MD045: false # Images should have alternate text (alt text)
MD053: false # Link and image reference definitions should be needed
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ fmt: ## Run go fmt against code.
vet: ## Run go vet against code.
go vet ./...

.PHONY: mod.check
mod.check:#check go module dependencies
@echo 'running "go mod verify"'
@go mod verify
@echo 'checking for modified files.'
# fail in case there are uncommitted changes
@ git diff --quiet || (echo "files were modified: " ; git status --porcelain ; false)

.PHONY: test
test: manifests generate fmt vet envtest ## Run tests.
OPERATOR_NAMESPACE="$${OPERATOR_NAMESPACE:=$(NAMESPACE)}" KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out
Expand Down
80 changes: 74 additions & 6 deletions bundle/manifests/cephcsi-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
annotations:
alm-examples: '[]'
capabilities: Basic Install
createdAt: "2024-10-17T04:07:22Z"
createdAt: "2024-11-06T08:04:38Z"
olm.skipRange: ""
operators.operatorframework.io/builder: operator-sdk-v1.34.1
operators.operatorframework.io/operator-type: non-standalone
Expand Down Expand Up @@ -46,6 +46,28 @@ spec:
verbs:
- get
- list
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- csinodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -139,6 +161,43 @@ spec:
verbs:
- update
- patch
- apiGroups:
- groupsnapshot.storage.k8s.io
resources:
- volumegroupsnapshotclasses
verbs:
- get
- list
- watch
- apiGroups:
- groupsnapshot.storage.k8s.io
resources:
- volumegroupsnapshotcontents
verbs:
- get
- list
- watch
- update
- patch
- apiGroups:
- groupsnapshot.storage.k8s.io
resources:
- volumegroupsnapshotcontents/status
verbs:
- update
- patch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- get
- apiGroups:
- ""
resources:
- serviceaccounts/token
verbs:
- create
serviceAccountName: ceph-csi-cephfs-ctrlplugin-sa
- rules:
- apiGroups:
Expand Down Expand Up @@ -616,21 +675,30 @@ spec:
verbs:
- create
- apiGroups:
- ""
- groupsnapshot.storage.k8s.io
resources:
- nodes
- volumegroupsnapshotclasses
verbs:
- get
- list
- watch"
- watch
- apiGroups:
- storage.k8s.io
- groupsnapshot.storage.k8s.io
resources:
- csinodes
- volumegroupsnapshotcontents
verbs:
- get
- list
- watch
- update
- patch
- apiGroups:
- groupsnapshot.storage.k8s.io
resources:
- volumegroupsnapshotcontents/status
verbs:
- update
- patch
serviceAccountName: ceph-csi-rbd-ctrlplugin-sa
- rules:
- apiGroups:
Expand Down
24 changes: 24 additions & 0 deletions config/csi-rbac/cephfs_ctrlplugin_cluster_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete", "patch", "update"]
Expand Down Expand Up @@ -39,3 +48,18 @@ rules:
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update", "patch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotcontents"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotcontents/status"]
verbs: ["update", "patch"]
- apiGroups: [""]
resources: ["serviceaccounts"]
verbs: ["get"]
- apiGroups: [""]
resources: ["serviceaccounts/token"]
verbs: ["create"]
13 changes: 8 additions & 5 deletions config/csi-rbac/rbd_ctrlplugin_cluster_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ rules:
- apiGroups: [""]
resources: ["serviceaccounts/token"]
verbs: ["create"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotcontents"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["groupsnapshot.storage.k8s.io"]
resources: ["volumegroupsnapshotcontents/status"]
verbs: ["update", "patch"]
Loading

0 comments on commit 24cfebf

Please sign in to comment.