Skip to content
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

Helm cleanup #1173

Merged
merged 2 commits into from
Mar 26, 2024
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
13 changes: 1 addition & 12 deletions infrastructure/helm/bailo/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ app.kubernetes.io/name: {{ include "bailo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "bailo.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "bailo.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Mongo host defination
*/}}
Expand All @@ -69,7 +58,7 @@ Mongo host defination
Create the mongo connection URI
*/}}
{{- define "bailo.mongoConnectionURI" -}}
mongodb://{{ index .Values.mongodb.auth.usernames 0 }}:${MONGO_PASSWORD}@{{ include "bailo.mongo.host" . }}
mongodb://{{ include "bailo.mongo.host" . }}
{{- end }}

{{/*
Expand Down
98 changes: 10 additions & 88 deletions infrastructure/helm/bailo/templates/bailo/bailo.configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,11 @@ data:
publicKey: '/app/certs/cert.pem',
},

s2i: {
path: '/s2i/s2i',
},

build: {
// Environment to build in, can be 'img' or 'openshift'
environment: '{{ .Values.config.build.environment }}',

// These settings only matter in OpenShift
openshift: {
// Build configs, secrets and builds will be triggered in this namespace
namespace: '{{ .Values.openshift.namespace }}',
// The name of the secret for the application to create to securely allow OpenShift to communicate with the Bailo registry
dockerPushSecret: '{{ .Values.openshift.dockerPushSecretName }}',
},
},

mongo: {
// A mongo connection URI, can contain usernames, passwords, replica set information, etc.
// See: https://www.mongodb.com/docs/manual/reference/connection-string/
uri: 'OVERWRITTEN_BY_ENVIRONMENT_VARIABLE',
uri: '{{ include "bailo.mongoConnectionURI" . }}',
user: '{{ index .Values.mongodb.auth.usernames 0 }}',

connectionOptions: {
useFindAndModify: false,
Expand All @@ -59,29 +43,6 @@ data:
},
},

minio: {
// Connection information for an s3-compliant file store. Settings are passed directly to 'minio', see reference for options:
// https://min.io/docs/minio/linux/developers/javascript/API.html#constructor
connection: {
endPoint: '{{ include "bailo.minio.host" . }}',
port: {{ .Values.minio.service.ports.api }},
useSSL: {{ .Values.minio.useSSL }},
accessKey: 'OVERWRITTEN_BY_ENVIRONMENT_VARIABLE',
secretKey: 'OVERWRITTEN_BY_ENVIRONMENT_VARIABLE',
region: '{{ .Values.minio.region }}',
partSize: {{ .Values.minio.partSizeMB }} * 1024 * 1024,
},

// Automatically create the upload / registry bucket if they're not found?
automaticallyCreateBuckets: {{ .Values.minio.createBuckets }},

// Names of buckets that Bailo uses
buckets: {
uploads: '{{ .Values.minio.uploadBucket }}',
registry: '{{ .Values.minio.registryBucket }}',
},
},

registry: {
connection:{
// This is explicitly NOT using connection.protocol, as this should always be
Expand Down Expand Up @@ -124,25 +85,8 @@ data:
from: '{{ .Values.config.smtp.from }}',
},

logging: {
// Log out to a file
file: {
enabled: false,
level: 'info',
path: './logs/out.log',
},

// Log out to a stroom instance
stroom: {
enabled: {{ .Values.stroom.enabled }},
folder: '{{ .Values.stroom.folder }}',
url: '{{ .Values.stroom.url }}',
feed: '{{ .Values.stroom.feed }}',
environment: '{{ .Values.stroom.environment }}',
system: '{{ .Values.stroom.system }}',
insecure: {{ .Values.stroom.insecure }},
interval: {{ .Values.stroom.interval }},
},
log: {
level: 'info',
},

session: {
Expand Down Expand Up @@ -188,6 +132,7 @@ data:
enabled: {{ .Values.config.ui.banner.enabled }},
text: '{{ .Values.config.ui.banner.text }}',
colour: '{{ .Values.config.ui.banner.colour }}',
textColor: '{{ .Values.config.ui.banner.textColor}}'
},

// Contact details for the support team
Expand All @@ -201,28 +146,6 @@ data:
registry: {
host: '{{ .Values.route.appPublicRoute }}',
},

// A configurable checkbox on the last page when uploading a model
uploadWarning: {
showWarning: true,
checkboxText: 'By checking here you confirm that the information is correct',
},

// A configurable checkbox on the last page when requesting a deployment
deploymentWarning: {
showWarning: true,
checkboxText: 'By checking here you confirm that the information is correct',
},

// The available seldon versions that can be used to build images
seldonVersions: [
{
name: '{{ .Values.config.s2i.name }}',
image: '{{ .Values.config.s2i.image }}',
},
],

maxModelSizeGB: 50,
},

connectors: {
Expand All @@ -233,6 +156,10 @@ data:
authorisation: {
kind: '{{ .Values.connectors.authorisation.kind }}',
},

audit: {
kind: '{{ .Values.connectors.audit.kind }}',
},
},

log: {
Expand Down Expand Up @@ -265,14 +192,9 @@ data:

custom-environment-variables.cjs: |
module.exports = {
minio: {
connection: {
accessKey: 'MINIO_ACCESS_KEY',
secretKey: 'MINIO_SECRET_KEY',
},
},
mongo: {
uri: 'MONGO_CONNECTION_URI',
pass: 'MONGO_PASSWORD',
},
s3: {
credentials: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ spec:
labels:
name: backend
spec:
serviceAccountName: {{ include "bailo.fullname" . }}-builder
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -50,8 +49,6 @@ spec:
secretKeyRef:
name: {{ include "bailo.fullname" . }}-mongodb
key: mongodb-passwords
- name: MONGO_CONNECTION_URI
value: 'mongodb://{{ index .Values.mongodb.auth.usernames 0 }}:{{ index .Values.mongodb.auth.passwords 0 }}@{{ include "bailo.mongo.host" . }}'
{{- if .Values.instrumentation.enabled }}
- name: OTEL_EXPORTER_TOKEN
valueFrom:
Expand Down

This file was deleted.

15 changes: 4 additions & 11 deletions infrastructure/helm/bailo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ config:
enabled: false
text: "BAILO"
colour: "#047a06"
textColor: "black"

smtp:
#host: 'mail' #service name
Expand All @@ -239,17 +240,6 @@ config:
protocol: "https"
port: 443

# logging https://github.com/gchq/stroom
stroom:
enabled: false
url: "http://localhost:8090/stroom/datafeed"
folder: "./logs/stroom"
system: "bailo"
feed: "bailo"
environment: "Development"
insecure: true
interval: 300000

# nginx.deployment registry.deployment
nginxcert:
cert: cert.pem #use san.cnf to create certs
Expand All @@ -262,6 +252,9 @@ connectors:
authorisation:
kind: 'basic'

audit:
kind: 'silly'

instrumentation:
enabled: false
debug: false
Loading