osc-common

by joaquinito2051

Helm chartv0.20.0App 0.1.0

OSC common Helm Chart

About this chart

osc-common

OSC common Helm Chart

Maintainers

NameEmailUrl
treydock

Requirements

RepositoryNameVersion
https://oauth2-proxy.github.io/manifestsoauth2-proxy10.6.0

Usage

Auth with OAuth2 Proxy

To use OAuth2 Proxy the following is the minimal configuration:

global:
  oscServiceAccount: username
  auth:
    enable: true
    upstream: http://{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local:80
  ingress:
    host: test.example.com

For a service that does built-in OAuth you can disable OAuth2 Proxy but keep the necessary KeycloakClient configuration

global:
  oscServiceAccount: username
  auth:
    enable: false
    keycloakClient:
      forceCreate: true
  ingress:
    host: test.example.com

Helpers

KeyDescriptionSource
osc.common.environmentThe environmentglobal.environment (def: production)
osc.common.serviceAccountKeyThe service account label keyosc.edu/service-account
osc.common.serviceAccountValueThe global or environment service accountglobal.env.<env>.serviceAccount or global.oscServiceAccount
osc.common.serviceAccountThe key: value of service account that is to be embedded in deployment labels{"osc.common.serviceAccountKey": "osc.common.serviceAccountValue"}
osc.common.nodeSelectorRoleKeyThe nodeSelector role keyglobal.nodeSelectorRole
osc.common.nodeSelectorRoleThe full key: value nodeSelector role that should be used to set nodeSelector"osc.common.nodeSelectorRoleKey"
osc.common.roleKeyThe label key for role associated with podsdefault: osc.edu/role
osc.common.roleThe full key: value role that should be used with pod labels{"osc.common.roleKey": "global.nodeSelectorRole"}
osc.common.imagePullSecret.nameThe imagePullSecret nameglobal.imagePullSecret.name (def: osc-registry)
osc.common.imagePullSecretThe imagePullSecret base64 encoded to be passed into a Secretglobal.imagePullSecret

Values

KeyDescriptionDefault
global.oscServiceAccountThe service account used by OSC deployments. required Also pulled from global.env..serviceAccount""
global.environmentThe deployment's OSC environment. Value is set by Puppet when deployed to OSC."production"
global.nodeSelectorRoleThe OSC node role to use with nodeSelector"webservices"
global.imagePullSecret.createCreate the image pull secrettrue
global.imagePullSecret.nameimagePullSecret name"osc-registry"
global.imagePullSecret.registryimagePullSecret registry"docker-registry.osc.edu"
global.imagePullSecret.usernameimagePullSecret username"robot$webservices-read"
global.imagePullSecret.passwordimagePullSecret password. This value will be set by OSC's Puppet. This value must be set to IMAGE-PULL-PASSWORD for CI tests.nil
global.networkPolicy.createCreate the network policytrue
global.networkPolicy.podSelectorLabels for NetworkPolicy podSelector. Defaults to "osc.common.selectorLabels"nil
global.networkPolicy.ingressAllowedPodsLabels of pods allowed to Ingress from the same namespace[]
global.networkPolicy.allowFromAdditional ingress allow rules[]
global.networkPolicy.ingressNamespaceName of the Ingress namespace"ingress-nginx"
global.networkPolicy.prometheusNamespaceName of the Prometheus namespace"prometheus"
global.networkPolicy.portsPorts that should be used for the network policy[]
global.debugGroupsGroups that debug pods[]
global.maintenanceGroupsGroups that can perform maintenance operations[]
global.portforwardGroupsGroups that are allowed to perform port forwarding[]
global.portforwardServiceAccountsService accounts that can do port forwarding. Element keys are name and namespace.[]
global.viewGroupsGroups that can view all resources, including Secrets[]
global.webservicesDeploy.createCreate webservices deployment rolebindingtrue
global.webservicesDeploy.clusterRoleOSC managed webservices-deploy ClusterRole name"webservices-deploy"
global.webservicesDeploy.serviceAccountOSC managed webservices-deploy ServiceAccount name"webservices-deploy"
global.auth.enableEnable auth management, also oauth2-proxy.enable supportedfalse
global.auth.upstreamThe upstream service for the OAuth2 proxy. required when auth is enabled""
global.auth.skipAuthRoutesRoutes to skip auth[]
global.auth.allowGroupsRestrict access to these groups[]
global.auth.commonAllowGroupsCommon groups to allow["sysstf"]
global.auth.redirectUriPathPath used for redirect URI"/*"
global.auth.redirectUrisRedirect URIs[]
global.auth.defaultClientScopesDefault client scopes for the Keycloak client["web-origins","roles","profile","groups","osc-oidc-clients","basic","email"]
global.auth.extraDefaultClientScropesExtra default client scopes for the Keycloak client[]
global.auth.keycloakClient.forceCreateForce creating KeycloakClient when Oauth2 Proxy management is disabledfalse
global.auth.keycloakClient.secret.nameThe secret name for the Keycloak Client secret-auth-secret
global.auth.keycloakClient.configMap.nameThe configmap name for the Keycloak Client config-auth-config
global.auth.keycloakClient.configAdditional Keycloak Client configs{}
global.ingress.hostIngress host value""
global.ingress.hostAliasIngress host alias""
global.ingress.additionalHostsIngress additional hosts[]
global.alert.receiverThe alert receiver name""
keycloakClient.enableEnable KeycloakClient resourcefalse
keycloakClient.useGlobalUse global values for redirectUristrue
keycloakClient.redirectUrisredirect URIs[]
keycloakClient.configAdditional Keycloak Client configsglobal.auth.keycloakClient.config
keycloakClient.secret.nameThe secret name for the Keycloak Client secretglobal.auth.keycloakClient.secret.name
keycloakClient.secret.clientSecretKeyClient Secret key in the secret"client-secret"
keycloakClient.secret.clientIdKeyClient ID key in the secret"client-id"
keycloakClient.secret.issuerUrlKeyIssuer URL key in the secret"issuer-url"
keycloakClient.secret.envVarKeysUse env var keys in the secretfalse
keycloakClient.secret.keyPrefixKey prefix in the secret""
keycloakClient.configMap.nameThe configmap name for the Keycloak Client configglobal.auth.keycloakClient.configMap.name
keycloakClient.configMap.keycloakUrlKeyKeycloak URL"KEYCLOAK_URL"
keycloakClient.configMap.keycloakHostKeyKeycloak Host"KEYCLOAK_HOST"
keycloakClient.configMap.issuerUrlKeyKeycloak issuer URL"ISSUER_URL"
keycloakClient.configMap.providerUrlKeyKeycloak provider well-known config URL"PROVIDER_URL"
keycloakClient.configMap.envVarKeysUse env var keys in the configmaptrue
keycloakClient.configMap.keyPrefixKey prefix in the configmap""
imagePullSecret.createCreate the image pull secrettrue
rbac.createCreate common RBAC when global items definedtrue
oauth2-proxy.enableEnable oauth2-proxyfalse
oauth2-proxy.image.registryThe OSC registryThe OSC registry hostname
oauth2-proxy.image.repositoryPath to oauth2-proxy on the OSC registry"kubernetes/oauth2-proxy"
oauth2-proxy.image.tagoauth2-proxy image tag. must be replicated to the OSC registry"v7.15.6"
oauth2-proxy.resources.limits.cpuCPU limit for OAuth2 Proxy pods"200m"
oauth2-proxy.resources.limits.memoryMemory limit for OAuth2 Proxy pods"128Mi"
oauth2-proxy.resources.requests.cpuCPU request for OAuth2 Proxy pods"100m"
oauth2-proxy.resources.requests.memoryMemory request for OAuth2 Proxy pods"64Mi"
oauth2-proxy.ingress.enabledEnable OAuth2 Proxy Ingresstrue
oauth2-proxy.ingress.extraPathsAdditional Ingress paths[]

Deploy osc-common with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has osc-common on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartosc-common is pinned at v0.20.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply