Skip to content

Commit 0cc8610

Browse files
authored
Merge branch 'main' into conflict-fix
2 parents 8c14f17 + bffc9d8 commit 0cc8610

32 files changed

+663
-145
lines changed

docs/helm/cavern.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ $ curl https://myhost.example.com/cavern/availability
101101
| `deployment.resources.requests.cpu` | CPU request for the Cavern container | `500m` |
102102
| `deployment.resources.limits.memory` | Memory limit for the Cavern container | `1Gi` |
103103
| `deployment.resources.limits.cpu` | CPU limit for the Cavern container | `500m` |
104+
| `deployment.cavern.registryURL` | (list OR string) | `[]` IVOA Registry array of IVOA Registry locations or single IVOA Registry location |
104105
| `livenessProbe` | Configure the liveness probe check | `{}` |
105106
| `readinessProbe` | Configure the readiness probe check | `{}` |
106107
| `tolerations` | Tolerations to apply to the Cavern Pod | `[]` |

docs/helm/posix-mapper.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ See the [values.yaml](values.yaml) file for a complete list of configuration opt
146146
| `deployment.posixMapper.extraHosts` | List of extra hosts to be added to the POSIX Mapper deployment. See the `values.yaml` file for examples. | `[]` |
147147
| `deployment.posixMapper.extraEnv` | List of extra environment variables to be set in the POSIX Mapper service. See the `values.yaml` file for examples. | `[]` |
148148
| `deployment.posixMapper.resources` | Resource requests and limits for the POSIX Mapper API | `{}` |
149+
| `deployment.posixMapper.registryURL` | (list OR string) | `[]` IVOA Registry array of IVOA Registry locations or single IVOA Registry location |
149150
| `postgresql.maxActive` | Maximum number of active connections to the PostgreSQL database | `8` |
150151
| `postgresql.url` | Required JDBC URL for the PostgreSQL database | `""` |
151152
| `postgresql.schema` | Required Database schema to use for the POSIX Mapper | `""` |

docs/helm/skaha.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ The following table lists the configurable parameters for the Skaha Helm chart:
7979
| `deployment.skaha.serviceAccountName` | Name of the Service Account for the Skaha API Pod | `"skaha"` |
8080
| `deployment.skaha.identityManagerClass` | Java Class name for the [IdentityManager](https://github.com/opencadc/core/blob/main/cadc-util/src/main/java/ca/nrc/cadc/auth/IdentityManager.java) to use. Defaults to [`org.opencadc.auth.StandardIdentityManager`](https://github.com/opencadc/ac/blob/main/cadc-gms/src/main/java/org/opencadc/auth/StandardIdentityManager.java) for use with bearer tokens (OIDC) | `"org.opencadc.auth.StandardIdentityManager"` |
8181
| `deployment.skaha.apiVersion` | API version used to match the Ingress path (e.g. `/skaha/v0`) | `"v0"` |
82+
| `deployment.skaha.registryURL` | (list OR string) | `[]` IVOA Registry array of IVOA Registry locations or single IVOA Registry location |
8283
| `deployment.skaha.sessions.expirySeconds` | Expiry time, in seconds, for interactive sessions. Defaults to four (4) days. | `"345600"` |
8384
| `deployment.skaha.sessions.imagePullPolicy` | Image pull policy for all User Sessions. | `"Always"` |
8485
| `deployment.skaha.sessions.maxCount` | Maximum number of interactive sessions per user. Defaults to three (3). | `"3"` |
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
5+
# Common VCS directories
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
14+
# Common backup files
15+
*.swp
16+
*.bak
17+
*.tmp
18+
*.orig
19+
*~
20+
21+
# Various IDEs
22+
.project
23+
.idea/
24+
*.tmproj
25+
.vscode/
26+
*.code-workspace
27+
28+
# OS files
29+
.DS_Store
30+
Thumbs.db
31+
32+
# Helm-specific files
33+
.helmignore
34+
35+
# Documentation
36+
README.md
37+
NOTES.md
38+
39+
# CI/CD
40+
.github/
41+
.gitlab-ci.yml
42+
.travis.yml
43+
.circleci/
44+
45+
# Development files
46+
values-dev.yaml
47+
values-local.yaml
48+
*.test.yaml
49+
50+
# Temporary files
51+
tmp/
52+
temp/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v2
2+
name: science-portal
3+
description: A Helm chart for Science Portal Next.js application
4+
type: application
5+
version: 0.1.0
6+
appVersion: "0.1.0"
7+
keywords:
8+
- nextjs
9+
- science-portal
10+
- web-application
11+
maintainers:
12+
- name: Science Portal Team
13+
home: https://github.com/opencadc/science-portal
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "science-portal.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
*/}}
11+
{{- define "science-portal.fullname" -}}
12+
{{- if .Values.fullnameOverride }}
13+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
14+
{{- else }}
15+
{{- $name := default .Chart.Name .Values.nameOverride }}
16+
{{- if contains $name .Release.Name }}
17+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
18+
{{- else }}
19+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
20+
{{- end }}
21+
{{- end }}
22+
{{- end }}
23+
24+
{{/*
25+
Create chart name and version as used by the chart label.
26+
*/}}
27+
{{- define "science-portal.chart" -}}
28+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
29+
{{- end }}
30+
31+
{{/*
32+
Common labels
33+
*/}}
34+
{{- define "science-portal.labels" -}}
35+
helm.sh/chart: {{ include "science-portal.chart" . }}
36+
{{ include "science-portal.selectorLabels" . }}
37+
{{- if .Chart.AppVersion }}
38+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
39+
{{- end }}
40+
app.kubernetes.io/managed-by: {{ .Release.Service }}
41+
{{- end }}
42+
43+
{{/*
44+
Selector labels
45+
*/}}
46+
{{- define "science-portal.selectorLabels" -}}
47+
app.kubernetes.io/name: {{ include "science-portal.name" . }}
48+
app.kubernetes.io/instance: {{ .Release.Name }}
49+
{{- end }}
50+
51+
{{/*
52+
Create the name of the service account to use
53+
*/}}
54+
{{- define "science-portal.serviceAccountName" -}}
55+
{{- if .Values.serviceAccount.create }}
56+
{{- default (include "science-portal.fullname" .) .Values.serviceAccount.name }}
57+
{{- else }}
58+
{{- default "default" .Values.serviceAccount.name }}
59+
{{- end }}
60+
{{- end }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "science-portal.fullname" . }}
5+
labels:
6+
{{- include "science-portal.labels" . | nindent 4 }}
7+
data:
8+
# This ConfigMap can be used for non-sensitive configuration
9+
# For now, we're using environment variables directly in the deployment
10+
# Add any configuration files or non-sensitive data here
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "science-portal.fullname" . }}
5+
labels:
6+
{{- include "science-portal.labels" . | nindent 4 }}
7+
spec:
8+
{{- if not .Values.autoscaling.enabled }}
9+
replicas: {{ .Values.replicaCount }}
10+
{{- end }}
11+
selector:
12+
matchLabels:
13+
{{- include "science-portal.selectorLabels" . | nindent 6 }}
14+
strategy:
15+
type: RollingUpdate
16+
rollingUpdate:
17+
maxSurge: 1
18+
maxUnavailable: 0
19+
template:
20+
metadata:
21+
annotations:
22+
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
23+
{{- with .Values.podAnnotations }}
24+
{{- toYaml . | nindent 8 }}
25+
{{- end }}
26+
labels:
27+
{{- include "science-portal.selectorLabels" . | nindent 8 }}
28+
spec:
29+
{{- with .Values.imagePullSecrets }}
30+
imagePullSecrets:
31+
{{- toYaml . | nindent 8 }}
32+
{{- end }}
33+
serviceAccountName: {{ include "science-portal.serviceAccountName" . }}
34+
securityContext:
35+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
36+
containers:
37+
- name: {{ .Chart.Name }}
38+
securityContext:
39+
{{- toYaml .Values.securityContext | nindent 12 }}
40+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
41+
imagePullPolicy: {{ .Values.image.pullPolicy }}
42+
ports:
43+
- name: http
44+
containerPort: {{ .Values.service.targetPort }}
45+
protocol: TCP
46+
livenessProbe:
47+
{{- toYaml .Values.livenessProbe | nindent 12 }}
48+
readinessProbe:
49+
{{- toYaml .Values.readinessProbe | nindent 12 }}
50+
resources:
51+
{{- toYaml .Values.resources | nindent 12 }}
52+
env:
53+
{{- range .Values.env }}
54+
- name: {{ .name }}
55+
value: {{ .value | quote }}
56+
{{- end }}
57+
# OIDC Configuration
58+
- name: NEXT_OIDC_URI
59+
value: {{ .Values.oidc.uri | quote }}
60+
- name: NEXT_PUBLIC_OIDC_URI
61+
value: {{ .Values.oidc.uri | quote }}
62+
- name: NEXT_OIDC_CLIENT_ID
63+
value: {{ .Values.oidc.clientId | quote }}
64+
- name: NEXT_PUBLIC_OIDC_CLIENT_ID
65+
value: {{ .Values.oidc.clientId | quote }}
66+
- name: NEXT_OIDC_CALLBACK_URI
67+
value: {{ .Values.oidc.callbackUri | quote }}
68+
- name: NEXT_PUBLIC_OIDC_CALLBACK_URI
69+
value: {{ .Values.oidc.callbackUri | quote }}
70+
- name: NEXT_OIDC_REDIRECT_URI
71+
value: {{ .Values.oidc.redirectUri | quote }}
72+
- name: NEXT_PUBLIC_OIDC_REDIRECT_URI
73+
value: {{ .Values.oidc.redirectUri | quote }}
74+
- name: NEXT_OIDC_SCOPE
75+
value: {{ .Values.oidc.scope | quote }}
76+
- name: NEXT_PUBLIC_OIDC_SCOPE
77+
value: {{ .Values.oidc.scope | quote }}
78+
# Secrets from Kubernetes Secret
79+
- name: AUTH_SECRET
80+
valueFrom:
81+
secretKeyRef:
82+
name: {{ .Values.secrets.existingSecret }}
83+
key: {{ .Values.secrets.keys.authSecret }}
84+
- name: NEXT_OIDC_CLIENT_SECRET
85+
valueFrom:
86+
secretKeyRef:
87+
name: {{ .Values.secrets.existingSecret }}
88+
key: {{ .Values.secrets.keys.oidcClientSecret }}
89+
{{- with .Values.volumeMounts }}
90+
volumeMounts:
91+
{{- toYaml . | nindent 12 }}
92+
{{- end }}
93+
{{- with .Values.volumes }}
94+
volumes:
95+
{{- toYaml . | nindent 8 }}
96+
{{- end }}
97+
{{- with .Values.nodeSelector }}
98+
nodeSelector:
99+
{{- toYaml . | nindent 8 }}
100+
{{- end }}
101+
{{- with .Values.affinity }}
102+
affinity:
103+
{{- toYaml . | nindent 8 }}
104+
{{- end }}
105+
{{- with .Values.tolerations }}
106+
tolerations:
107+
{{- toYaml . | nindent 8 }}
108+
{{- end }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{- if .Values.autoscaling.enabled }}
2+
apiVersion: autoscaling/v2
3+
kind: HorizontalPodAutoscaler
4+
metadata:
5+
name: {{ include "science-portal.fullname" . }}
6+
labels:
7+
{{- include "science-portal.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "science-portal.fullname" . }}
13+
minReplicas: {{ .Values.autoscaling.minReplicas }}
14+
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
15+
metrics:
16+
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
17+
- type: Resource
18+
resource:
19+
name: cpu
20+
target:
21+
type: Utilization
22+
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
23+
{{- end }}
24+
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
25+
- type: Resource
26+
resource:
27+
name: memory
28+
target:
29+
type: Utilization
30+
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
31+
{{- end }}
32+
{{- end }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{{- if .Values.ingress.enabled -}}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: {{ include "science-portal.fullname" . }}
6+
labels:
7+
{{- include "science-portal.labels" . | nindent 4 }}
8+
{{- with .Values.ingress.annotations }}
9+
annotations:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
spec:
13+
{{- if .Values.ingress.className }}
14+
ingressClassName: {{ .Values.ingress.className }}
15+
{{- end }}
16+
{{- if .Values.ingress.tls }}
17+
tls:
18+
{{- range .Values.ingress.tls }}
19+
- hosts:
20+
{{- range .hosts }}
21+
- {{ . | quote }}
22+
{{- end }}
23+
secretName: {{ .secretName }}
24+
{{- end }}
25+
{{- end }}
26+
rules:
27+
{{- range .Values.ingress.hosts }}
28+
- host: {{ .host | quote }}
29+
http:
30+
paths:
31+
{{- range .paths }}
32+
- path: {{ .path }}
33+
pathType: {{ .pathType }}
34+
backend:
35+
service:
36+
name: {{ include "science-portal.fullname" $ }}
37+
port:
38+
number: {{ $.Values.service.port }}
39+
{{- end }}
40+
{{- end }}
41+
{{- end }}

0 commit comments

Comments
 (0)