Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update chart main/storageclass-accessor #337

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/storageclass-accessor/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ sources:
- https://github.com/kubesphere/storageclass-accessor

type: application
version: 0.1.0
appVersion: v0.1.1
version: 0.1.1
appVersion: v0.1.2
5 changes: 3 additions & 2 deletions src/main/storageclass-accessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ helm delete storageclass-accessor --namespace storageclass-accessor

The following table lists the configurable parameters of the chart and their default values.

Parameter | Description | Default
Parameter | Description | Default
--- | --- | ---
`image.repository` | Image repository of accessor deployment | `kubesphere/storageclass-accessor`
`image.repository` | Image repository of accessor deployment | `kubesphere/storageclass-accessor`
`image.tag` | Image tag of accessor deployment | `latest`
`webhook.timeoutSeconds` | The maximum number of seconds used by the webhook to verify | `5`
61 changes: 60 additions & 1 deletion src/main/storageclass-accessor/templates/accessor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,67 @@ spec:
type: object
storageClassName:
type: string
workspaceSelector:
properties:
fieldSelector:
items:
properties:
fieldExpressions:
items:
properties:
field:
enum:
- Name
- Status
type: string
operator:
enum:
- In
- NotIn
type: string
values:
items:
type: string
type: array
required:
- field
- operator
- values
type: object
type: array
required:
- fieldExpressions
type: object
type: array
labelSelector:
items:
properties:
matchExpressions:
items:
properties:
key:
type: string
operator:
enum:
- In
- NotIn
type: string
values:
items:
type: string
type: array
required:
- key
- operator
- values
type: object
type: array
required:
- matchExpressions
type: object
type: array
type: object
required:
- namespaceSelector
- storageClassName
type: object
type: object
Expand Down
2 changes: 1 addition & 1 deletion src/main/storageclass-accessor/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: storageclass-accessor
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: IfNotPresent
args: ['--tls-cert-file=/etc/storageclass-accessor-webhook/certs/cert.pem', '--tls-private-key-file=/etc/storageclass-accessor-webhook/certs/key.pem']
ports:
Expand Down
13 changes: 8 additions & 5 deletions src/main/storageclass-accessor/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ metadata:
labels:
role: controller
rules:
- apiGroups: [ "" ]
resources: [ "namespaces" ]
verbs: [ "get", "list", "watch", "create", "delete", "update" ]
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get", "list", "watch"]

- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
verbs: ["get", "list", "watch"]

- apiGroups: ["storage.kubesphere.io"]
resources: ["accessors"]
verbs: [ "get", "list", "watch", "create", "delete", "update"]
verbs: ["get", "list", "watch"]

- apiGroups: ["tenant.kubesphere.io"]
resources: ["workspaces"]
verbs: ["get", "list", "watch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ webhooks:
rules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE", "UPDATE", "DELETE"]
operations: ["CREATE"]
resources: ["persistentvolumeclaims"]
scope: "*"
clientConfig:
Expand Down
1 change: 1 addition & 0 deletions src/main/storageclass-accessor/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
image:
repository: kubesphere/storageclass-accessor
tag: latest

webhook:
timeoutSeconds: 5