Skip to content
Merged
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
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ all: build
# More info on the awk command:
# http://linuxcommand.org/lc3_adv_awk.php

HELM_CRD_TEMPLATE ?= helm-chart/amalthea-sessions/templates/amaltheasession-crd.yaml
HELM_CRD_TEMPLATE ?= helm-chart/amalthea-sessions/crds/amaltheasession.yaml

.PHONY: help
help: ## Display this help.
Expand All @@ -101,10 +101,8 @@ help: ## Display this help.
.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
echo "{{- if .Values.deployCrd -}}" > $(HELM_CRD_TEMPLATE)
echo "# This manifest is auto-generated from the makefile do not edit manually." >> $(HELM_CRD_TEMPLATE)
echo "# This manifest is auto-generated from the makefile do not edit manually." > $(HELM_CRD_TEMPLATE)
cat config/crd/bases/*yaml >> $(HELM_CRD_TEMPLATE)
echo "{{- end }}" >> $(HELM_CRD_TEMPLATE)

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.deployCrd -}}
# This manifest is auto-generated from the makefile do not edit manually.
---
apiVersion: apiextensions.k8s.io/v1
Expand Down Expand Up @@ -6493,4 +6492,3 @@ spec:
storage: true
subresources:
status: {}
{{- end }}
13 changes: 9 additions & 4 deletions helm-chart/amalthea-sessions/templates/manager-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,20 @@ rules:
resources: [pods]
verbs: [get, list, watch]
# Amalthea: child resources we produce
# Note that we do not patch/update/delete them ever.
- apiGroups:
- ""
- apps
- networking.k8s.io
resources:
- statefulsets
- persistentvolumeclaims
- services
verbs: [create, get, list, watch]
- apiGroups:
- apps
resources:
- statefulsets
verbs: [create, get, list, watch]
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs: [create, get, list, watch, patch, update]
# Required for hibernating sessions
Expand Down
2 changes: 0 additions & 2 deletions helm-chart/amalthea-sessions/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ controllerManager:
kubernetesClusterDomain: cluster.local
# If set to true then the operator will watch and operate in all namespaces
clusterScoped: false
# Whether to install the CRD
deployCrd: true
# Whether to install the dependencies or not
deploy:
csiRclone: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.deployCrd -}}
# This manifest is auto-generated from controller/crds/jupyter_server.yaml, do not modify.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -307,4 +306,3 @@ spec:
default:
children: {}
mainPod: {}
{{- end }}
14 changes: 10 additions & 4 deletions helm-chart/amalthea/templates/rbac/_rbac_rules.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,22 @@
# Note that we do not patch/update/delete them ever.
- apiGroups:
- ""
- apps
- networking.k8s.io
resources:
- statefulsets
- persistentvolumeclaims
- services
- ingresses
Comment thread
olevski marked this conversation as resolved.
- secrets
- configmaps
verbs: [create, get, list, watch]
- apiGroups:
- apps
resources:
- statefulsets
verbs: [create, get, list, watch]
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs: [create, get, list, watch]

# Required for hibernating sessions
- apiGroups: ["apps"]
Expand Down
5 changes: 0 additions & 5 deletions helm-chart/amalthea/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@
},
"type": "object"
},
"deployCrd": {
"description": "Should the helm chart apply the k8s CRD.",
"type": "boolean"
},
"networkPolicies": {
"description": "Enable and configure network policies for the controller and jupyter servers.",
"type": "object",
Expand Down Expand Up @@ -436,7 +432,6 @@
},
"required": [
"scope",
"deployCrd",
"networkPolicies",
"kopf",
"extraChildResources",
Expand Down
2 changes: 0 additions & 2 deletions helm-chart/amalthea/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ scope:
# will only operate in the namespace where the helm chart is deployed.
# namespaces: ["default"]

deployCrd: true # whether to deploy the jupyterserver CRD

networkPolicies:
# # Enable sensible, default network policies. Note that until cluster-wide
# # network policies are available in Kubernetes (https://github.com/kubernetes/enhancements/issues/2091),
Expand Down
Loading