Skip to content

Commit

Permalink
Add prod testing values
Browse files Browse the repository at this point in the history
  • Loading branch information
cachemeoutside committed Nov 29, 2023
1 parent 3aa5663 commit 1edd889
Show file tree
Hide file tree
Showing 2 changed files with 188 additions and 0 deletions.
186 changes: 186 additions & 0 deletions charts/debug-prod-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Values file for oralhistoryprod
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
repository: uclalibrary/oral-history
# changing this tag will cause a deploy via ArgoCD
tag: v0.0.2
pullPolicy: Always

# Chart documentation: https://github.com/bitnami/charts/tree/main/bitnami/solr
solr:
# TODO: Solr heap size? docker-compose has SOLR_HEAP=4g
replicaCount: 1
collectionReplicas: 1
enabled: true

coreNames: ["blacklight-core"]

# Disable solr cloud
cloudEnabled: false
cloudBootstrap: false
zookeeper:
enabled: false

image:
repository: bitnami/solr
# This is the image version, not the chart version.
tag: 8.11.1
auth:
enabled: true
adminUsername: admin
existingSecret: oral-history-secrets
existingSecretPasswordKey: SOLR_ADMIN_PASSWORD
persistence:
enabled: true
storageClass: "vsphere-csi-sc"
size: 8Gi
mountPath: /bitnami/solr
# Chart documentation: https://github.com/bitnami/charts/tree/main/bitnami/postgresql
postgresql:
enabled: true
image:
repository: bitnami/postgresql
# This is the image version, not the chart version.
tag: 12.3.0

auth:
database: oral_history
secretKeys:
adminPasswordKey: POSTGRES_PASSWORD
userPasswordKey: POSTGRES_USER
existingSecret: oral-history-secrets
service:
ports:
postgresql: 5432
primary:
persistence:
# TODO: Should enabled be true?
enabled: false
size: 10Gi

# TODO: Variable names and values were copied from .env - is this all right?
web:
env:
SOLR_ADMIN_USER: admin
SOLR_HOST: oral-history-public-web-test-solr
SOLR_PORT: 8983

POSTGRES_DB: oral_history
POSTGRES_HOST: oral-history-public-web-test-postgresql

DEPLOY_HOOK: CHANGEME
DOCKER_PORTS: 80
MAKE_WAVES: true
PASSENGER_APP_ENV: production
RAILS_ENV: production
RACK_ENV: production

STAGING_HTTP_BASIC_USERNAME: "oralhistory"
STAGING_HTTP_BASIC_PASSWORD: "oralhistory"

REGISTRY_HOST: index.docker.io/
REGISTRY_URI: uclalibrary
# TODO: Real value
SITE_URI: oralhistory-k8s-test.library.ucla.edu
TAG: prod
TEST_DB: oral_history

worker:
replicaCount: 1
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

externalsecrets:
annotations:
argocd.argoproj.io/sync-wave: "-3"
enabled: true
# Reference to ClusterSecretStore name
ref: systems-clustersecretstore
secrets:
application:
data:
- secretKey: NEGATIVE_CAPTCHA_SECRET
remoteRef:
key: /systems/prodrke01/oh-public/negative_captcha_secret
- secretKey: POSTGRES_PASSWORD
remoteRef:
key: /systems/prodrke01/oh-public/db_password
- secretKey: POSTGRES_USER
remoteRef:
key: /systems/prodrke01/oh-public/db_username
- secretKey: SECRET_KEY_BASE
remoteRef:
key: /systems/prodrke01/oh-public/secret_key_base
- secretKey: SOLR_ADMIN_PASSWORD
remoteRef:
key: /systems/prodrke01/oh-public/solr_admin_password

# configure a registry token for access to your container registry, needs read permissions, create secret in Rancher, follow instructions:
# https://ranchermanager.docs.rancher.com/v2.5/how-to-guides/new-user-guides/kubernetes-resources-setup/kubernetes-and-docker-registries#creating-a-registry
# replace registry-token below with the name of the secret you created in the Rancher UI
imagePullSecrets: []
# - registry-token
fullnameOverride: "oral-history"

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

service:
type: ClusterIP
port: 80

ingress:
enabled: "true"
ingressClassName: "nginx"
annotations:
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
hosts:
# TODO: Set real production name
- host: oralhistory-k8s-test.library.ucla.edu
paths:
- "/"
tls: []

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

nodeSelector: {}

tolerations: []

affinity: {}
2 changes: 2 additions & 0 deletions charts/templates/oral-history-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ data:
SOLR_URL: "http://$(SOLR_ADMIN_USER):$(SOLR_ADMIN_PASSWORD)@$(SOLR_HOST):$(SOLR_PORT)/solr/blacklight-core"
MAKE_WAVES: "{{ .Values.web.env.MAKE_WAVES}}"
PASSENGER_APP_ENV: "{{ .Values.web.env.PASSENGER_APP_ENV}}"
RAILS_ENV: "{{ .Values.web.env.RAILS_ENV}}"
RACKS_ENV: "{{ .Values.web.env.RACKS_ENV}}"
TEST_DB: "{{ .Values.web.env.TEST_DB}}"

0 comments on commit 1edd889

Please sign in to comment.