-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from swelborn/helm
- Loading branch information
Showing
16 changed files
with
1,503 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "backend/agent/thirdparty/podman-hpc-py"] | ||
path = backend/agent/thirdparty/podman-hpc-py | ||
url = https://github.com/cjh1/podman-hpc-py.git | ||
[submodule "helm/spin-helm"] | ||
path = helm/spin-helm | ||
url = https://github.com/NERSC/spin-helm.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
|
||
from pydantic import Field, NatsDsn | ||
from pydantic import Field, NatsDsn, WebsocketUrl | ||
from pydantic_settings import BaseSettings, SettingsConfigDict | ||
|
||
|
||
class Settings(BaseSettings): | ||
model_config = SettingsConfigDict(env_file=None) | ||
NATS_SERVER_URL: NatsDsn = Field(default="nats://localhost:4222") | ||
NATS_SERVER_URL: NatsDsn | WebsocketUrl = Field(default="nats://localhost:4222") | ||
|
||
cfg = Settings() |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
from pydantic import Field, NatsDsn | ||
from pydantic import Field, NatsDsn, WebsocketUrl | ||
from pydantic_settings import BaseSettings, SettingsConfigDict | ||
|
||
|
||
class Settings(BaseSettings): | ||
model_config = SettingsConfigDict(env_file=None) | ||
NATS_SERVER_URL: NatsDsn = Field(default="nats://localhost:4222") | ||
NATS_SERVER_URL: NatsDsn | WebsocketUrl = Field(default="nats://localhost:4222") | ||
|
||
|
||
cfg = Settings() |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
config: | ||
cluster: | ||
enabled: true | ||
|
||
jetstream: | ||
enabled: true | ||
|
||
# Uncomment for external access through a websocket (outside NERSC) | ||
websocket: | ||
enabled: true | ||
port: 8080 | ||
ingress: | ||
enabled: true | ||
hosts: | ||
# - <your domain cname> | ||
- ingress.interactem.production.svc.spin.nersc.org | ||
path: / | ||
pathType: Exact | ||
className: nginx | ||
tlsSecretName: tls-cert | ||
name: ingress | ||
merge: | ||
metadata: | ||
annotations: | ||
nginx.ingress.kubernetes.io/whitelist-source-range: >- | ||
128.55.206.0/24, 128.55.205.0/24, 128.55.64.0/18 | ||
# this is to allow the ACME challenge to pass through the ingress given | ||
# the above whitelist. TODO: Not sure if it works. | ||
nginx.ingress.kubernetes.io/server-snippet: | | ||
location /.well-known/acme-challenge/ { | ||
allow all; | ||
} | ||
natsBox: | ||
container: | ||
image: | ||
tag: 0.14.4-nonroot | ||
|
||
|
||
extraResources: | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nats-external | ||
namespace: interactem | ||
labels: | ||
app.kubernetes.io/component: nats | ||
app.kubernetes.io/instance: nats | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: nats | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app.kubernetes.io/component: nats | ||
app.kubernetes.io/instance: nats | ||
app.kubernetes.io/name: nats | ||
ports: | ||
- name: nats | ||
port: 5672 # exposed port | ||
targetPort: 4222 # internal port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
kubectl -n interactem create secret generic kubeconfig --from-file=kubeconfig=${HOME}/.kube/config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
export SPIN_GID=99894 | ||
export SPIN_UID=99894 | ||
|
||
cd ../spin-helm/nats/kustomize | ||
|
||
helm upgrade --install -n interactem nats nats/nats --version 1.2.2 -f ../../../nats-values.yaml --post-renderer ./kustomize.sh | ||
|
||
cd ../../.. | ||
helm upgrade --install -n interactem -f ./tls-acme-values.yaml acmecron ./spin-helm/tls-acme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
replicaCount: 1 | ||
|
||
podSecurityContext: | ||
fsGroup: 99894 # NERSC GID for the project | ||
|
||
securityContext: | ||
runAsUser: 99894 # NERSC UID | ||
|
||
service: | ||
port: 8080 | ||
|
||
ingress: | ||
name: ingress | ||
enabled: false | ||
|
||
# concatenate the list .ingress.hosts.host into ":" separated string | ||
domain: ingress.interactem.production.svc.spin.nersc.org | ||
|
||
email: [email protected] # email address to be used for the ACME account | ||
|
||
cluster: production.svc.spin.nersc.org |