Skip to content

Commit c848a24

Browse files
author
Alan Christie
committed
fix: Hack to handle (ignore) v1alpha3
1 parent 181d43e commit c848a24

File tree

4 files changed

+91
-3
lines changed

4 files changed

+91
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The following will build an operator image with the tag `19.2.0-alpha.1`: -
6666

6767
export IMAGE_TAG=19.2.0-alpha.1
6868
docker-compose build
69-
dcoker-compose push
69+
docker-compose push
7070

7171
## Deploying into the Data Manager API
7272
We use [Ansible] 3 and community modules in [Ansible Galaxy] as the deployment

operator/handlers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ def configure(settings: kopf.OperatorSettings, **_: Any) -> None:
105105
settings.watching.client_timeout = 150
106106

107107

108+
@kopf.on.create("squonk.it", "v1alpha3", "jupyternotebooks", id="jupyter")
109+
def create_v1alpha3(
110+
spec: Dict[str, Any], name: str, namespace: str, **_: Any
111+
) -> Dict[str, Any]:
112+
"""Handler for legacy CRD create events."""
113+
raise kopf.PermanentError("No longer supported")
114+
115+
108116
@kopf.on.create("squonk.it", "v2", "jupyternotebooks", id="jupyter")
109117
def create(spec: Dict[str, Any], name: str, namespace: str, **_: Any) -> Dict[str, Any]:
110118
"""Handler for CRD create events.

production-parameters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22

3-
jo_image_tag: 19.2.1
3+
jo_image_tag: 19.2.2-rc.1
44
jo_dmapi_namespace: data-manager-api-production
55

66
jo_ingress_domain: squonk.it
77
jo_ingress_tls_secret: data-manager-api-tls
8-
jo_namespaces: data-manager-api-staging:data-manager-api-integration:data-manager-api-production
8+
jo_namespaces: data-manager-api-production
99

1010
jo_kubeconfig: "{{ lookup('env', 'KUBECONFIG') }}"

roles/operator/templates/crd.yaml.j2

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,83 @@ spec:
105105
x-kubernetes-preserve-unknown-fields: true
106106
served: true
107107
storage: true
108+
- additionalPrinterColumns:
109+
- description: URL for acessing the Jupyter notebook.
110+
jsonPath: .status.jupyter.notebook.url
111+
name: URL
112+
type: string
113+
- description: Token for accessing the Jupyter notebook.
114+
jsonPath: .status.jupyter.notebook.token
115+
name: Token
116+
type: string
117+
name: v1alpha3
118+
schema:
119+
openAPIV3Schema:
120+
type: object
121+
properties:
122+
spec:
123+
type: object
124+
properties:
125+
# All DataManager-injected material
126+
# will be namespaced by the property 'imDataManager'
127+
imDataManager:
128+
type: object
129+
properties:
130+
taskId:
131+
type: string
132+
image:
133+
type: string
134+
ingressProxyBodySize:
135+
type: string
136+
resources:
137+
type: object
138+
properties:
139+
limits:
140+
type: object
141+
properties:
142+
cpu:
143+
type: string
144+
memory:
145+
type: string
146+
storage:
147+
type: string
148+
requests:
149+
type: object
150+
properties:
151+
cpu:
152+
type: string
153+
memory:
154+
type: string
155+
storage:
156+
type: string
157+
serviceAccountName:
158+
type: string
159+
securityContext:
160+
type: object
161+
properties:
162+
runAsUser:
163+
type: integer
164+
runAsGroup:
165+
type: integer
166+
fsGroup:
167+
type: integer
168+
notebook:
169+
type: object
170+
properties:
171+
interface:
172+
type: string
173+
project:
174+
type: object
175+
properties:
176+
claimName:
177+
type: string
178+
id:
179+
type: string
180+
labels:
181+
type: array
182+
items:
183+
type: string
184+
status:
185+
type: object
186+
x-kubernetes-preserve-unknown-fields: true
187+
served: false

0 commit comments

Comments
 (0)