-
Notifications
You must be signed in to change notification settings - Fork 3
fix: handle default priority class and remote SA #1088
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| {{- if .Values.deploy.priorityClass -}} | ||
| --- | ||
| apiVersion: scheduling.k8s.io/v1 | ||
| description: Renku default resource quota priority class | ||
| kind: PriorityClass | ||
| metadata: | ||
| labels: | ||
| app: renku | ||
| name: renku-user-sessions-priority | ||
| preemptionPolicy: Never | ||
| value: 100 | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
|
|
@@ -8,4 +9,108 @@ metadata: | |
| app.kubernetes.io/part-of: amalthea | ||
| {{- include "amalthea-sessions.labels" . | nindent 4 }} | ||
| annotations: | ||
| {{- toYaml .Values.controllerManager.serviceAccount.annotations | nindent 4 }} | ||
| {{- toYaml .Values.controllerManager.serviceAccount.annotations | nindent 4 }} | ||
|
|
||
| {{- if .Values.deploy.remoteServiceAccount }} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: renku-remote-session-manager | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This service account is not used anywhere in amalthea? Why have it here?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is the same "service account name" used in the cluster spec on the data service then that is used to assign a specific service account to the user session that is created. And in almost all cases the sessions do not need a dedicated service account. The only place we have needed this is on openshift where a dedicated service account is used to get a different security context constraint. |
||
| labels: | ||
| app.kubernetes.io/component: rbac | ||
| app.kubernetes.io/created-by: amalthea | ||
| app.kubernetes.io/part-of: amalthea | ||
| {{- include "amalthea-sessions.labels" . | nindent 4 }} | ||
| annotations: | ||
| {{- toYaml .Values.controllerManager.remoteServiceAccount.annotations | nindent 4 }} | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| name: renku-remote-session-manager-role | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| {{- include "amalthea-sessions.labels" . | nindent 4 }} | ||
| rules: | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - pods | ||
| - pods/log | ||
| - services | ||
| - endpoints | ||
| - secrets | ||
| - priorityclasses | ||
| - resourcequotas | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - pods | ||
| - secrets | ||
| verbs: | ||
| - delete | ||
| - apiGroups: | ||
| - apps | ||
| resources: | ||
| - statefulsets | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| - patch | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - secrets | ||
| - resourcequotas | ||
| verbs: | ||
| - create | ||
| - update | ||
| - delete | ||
| - patch | ||
| - apiGroups: | ||
| - scheduling.k8s.io | ||
| resources: | ||
| - priorityclasses | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| - apiGroups: | ||
| - amalthea.dev | ||
| resources: | ||
| - amaltheasessions | ||
| verbs: | ||
| - create | ||
| - update | ||
| - delete | ||
| - patch | ||
| - list | ||
| - get | ||
| - watch | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
| name: renku-remote-session-manager-rolebinding | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| app.kubernetes.io/component: rbac | ||
| app.kubernetes.io/created-by: amalthea | ||
| app.kubernetes.io/part-of: amalthea | ||
| {{- include "amalthea-sessions.labels" . | nindent 4 }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: Role | ||
| name: 'renku-remote-session-manager-role' | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: 'renku-remote-session-manager' | ||
| namespace: '{{ .Release.Namespace }}' | ||
|
|
||
| {{- end }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never referenced in the source code of amalthea. Why is it part of the helm chart? Amalthea does not make or manage priority classes.