project

by startxfr

Helm chartv21.3.418App 4.21.19GPL-3.0-or-laterVerified publisher

Helm chart used to create a project, or namespace, with various options constraint resources like networkPolicy, RoleBinding, LimitRange and Quotas.

About this chart

Basic Chart : Project

This helm chart is used to create a project, or namespace, with various options constraint resources like networkPolicy, RoleBinding, LimitRange and Quotas.

This chart is part of the basic-xxx startx helm chart series used by cluster-xxx charts and example-xxx charts.

Requirements and guidelines

Read the startx helm-repository homepage for more information on how to use these resources.

Deploy this helm chart on openshift

1. Connect to your Openshift cluster

oc login -t <token> <cluster-url>

2. Install the repository

helm repo add startx https://helm-repository.readthedocs.io/en/latest/repos/stable/

3. Get information about this chart

helm show chart startx/project

4. Install this chart

helm install project startx/project

Values files

Default values file (values.yaml)

Complete deployment of a project with the following characteristics :

  • 1 project named example-project
# base configuration running default configuration
helm install project startx/project

Demo kustomize values file (values-demo-kustomize.yaml)

Complete deployment of a demo kustomize project with the following characteristics :

  • 1 project named demo-kustomize
  • 4 RBAC rules enabled
    • 1 group RBAC named dev binding group dev to role view
    • 1 group RBAC named devops binding group devops to role edit
    • 1 group RBAC named ops binding group ops to role admin
    • 1 user RBAC named argocd-controller-sa binding user sa argocd-application-controller to role edit
  • 1 networkpolicy rules disabled
  • 1 limitRange rules enabled
  • 1 quotas rules enabled
# base configuration running demo kustomize configuration
helm install project-demo-kustomize startx/project -f https://raw.githubusercontent.com/startxfr/helm-repository/master/charts/project/values-demo-kustomize.yaml

Demo helm values file (values-demo-helm.yaml)

Complete deployment of a demo helm project with the following characteristics :

  • 1 project named demo-helm
  • 4 RBAC rules enabled
    • 1 group RBAC named dev binding group dev to role basic-user
    • 1 group RBAC named devops binding group devops to role edit
    • 1 group RBAC named ops binding group ops to role admin
    • 1 user RBAC named argocd-controller-sa binding user sa argocd-application-controller to role edit
  • 2 networkpolicy rules enabled
    • 1 networkpolicy named allow-from-openshift-ingress
    • 1 networkpolicy named allow-from-same-namespace
  • 1 limitRange rules enabled
  • 1 quotas rules enabled
# base configuration running demo helm configuration
helm install project-demo-helm startx/project -f https://raw.githubusercontent.com/startxfr/helm-repository/master/charts/project/values-demo-helm.yaml

Demo argocd values file (values-demo-argocd.yaml)

Complete deployment of a demo argocd project with the following characteristics :

  • 1 project named demo-argocd
  • 4 RBAC rules enabled
    • 1 group RBAC named dev binding group dev to role view
    • 1 group RBAC named devops binding group devops to role edit
    • 1 group RBAC named ops binding group ops to role admin
    • 1 user RBAC named argocd-controller-sa binding user sa argocd-application-controller to role edit
  • 2 networkpolicy rules disabled
  • 1 limitRange rules enabled
  • 1 quotas rules enabled
# base configuration running demo argocd configuration
helm install project-demo-argocd startx/project -f https://raw.githubusercontent.com/startxfr/helm-repository/master/charts/project/values-demo-argocd.yaml

Demo example values file (values-demo-example.yaml)

Complete deployment of a demo example project with the following characteristics :

  • 1 namespace named example-project
  • 2 RBAC rules enabled
    • 1 group RBAC named mygroup binding group mygroup_example to role basic-user
    • 1 user RBAC named myuser binding user myuser_example to role basic-user
  • 2 networkpolicy rules enabled
    • 1 networkpolicy named allow-from-openshift-ingress
    • 1 networkpolicy named allow-from-same-namespace
  • 1 limitRange rules enabled
  • 1 quotas rules enabled
# base configuration running demo example configuration
helm install project-example-project startx/project -f https://raw.githubusercontent.com/startxfr/helm-repository/master/charts/project/values-demo-example.yaml

Startx values file (values-startx.yaml)

Every block of this file is disabled (project, rbac, serviceAccounts, dockercfg, networkpolicy, limits, quotas are all enabled: false), so it renders nothing until you enable the blocks you need. It defines :

  • the project startx (display name Startx default project, requester startx)
  • 5 RBAC groups : students (view); dev (basic-user); devops (basic-user); ops (admin); system:authenticated (read-only), and 1 user
  • 1 serviceAccounts item, 3 dockercfg items
  • an empty networkpolicy rules list, limits rules with every value at 0, and quotas rules (hard section, most values at 0): adjust them before enabling the blocks
# nothing is created until a block is enabled, e.g. add --set project.enabled=true
helm install project-startx startx/project -f https://raw.githubusercontent.com/startxfr/helm-repository/master/charts/project/values-startx.yaml

Other values files

Every file below is a complete set of values, used with helm install project startx/project -f <file>.

  • demo projects : the 31 files matching values-demo*.yaml (for example values-demo-hpa.yaml) create one project named after the file (values-demo-hpa.yaml creates demo-hpa, values-demo.yaml creates demo; the exception is values-demo-example.yaml, project example-project) with context.environment: demo; some of them are also described above. Enabled blocks:
    • 22 file(s): project, RBAC, NetworkPolicy, LimitRange and quotas
    • 6 file(s): project, RBAC, LimitRange and quotas (no NetworkPolicy) (demo-automation, demo-costs, demo-kafka, demo-kepler, demo-keycloak, demo-knative)
    • 1 file(s): project, RBAC, LimitRange, quotas and service accounts (no NetworkPolicy) (demo-3scale)
    • 1 file(s): project only (demo-example)
    • 1 file(s): no block enabled, project.enabled: false (context and project name only) (demo)
  • other projects (one file each):

Values dictionary

context values dictionary

KeyDefaultDescription
context.scopedefaultName of the global scope for this application (organizational tenant)
context.clusterlocalhostName of the cluster running this application (platform tenant)
context.environmentdevName of the environment for this application (ex: dev, factory, preprod or prod)
context.componentdemoComponent name of this application (logical tenant)
context.appprojectApplication name (functional tenant, default use Chart name)
context.version0.0.1Version name of this application (default use Chart appVersion)

project values dictionary

KeyDefaultDescription
project.typeprojectDefine the type of tenant to create (project or namespace)
project.namedefaultName of the project
project.display_namedefaultDisplay name of the project (only for project)
project.descriptiondefaultDescription of the project (only for project)
rbac.enabledfalseEnable RBAC default for this project
rbac.groups[][]List groups to authorize on this project
rbac.groups[0].idmygroupGroup ID for roleBinding
rbac.groups[0].namemygroup_exampleGroup name for roleBinding
rbac.groups[0].roleviewRole to use for this group roleBinding
rbac.users[][]List groups to authorize on this project
rbac.users[0].idmyuserUser ID for roleBinding
rbac.users[0].namemyuser_exampleUser name for roleBinding
rbac.users[0].roleviewRole to use for this user roleBinding
networkpolicy.enabledfalseEnable NetworkPolicy default for this project
networkpolicy.rules[][]List group to create
networkpolicy.rules[0].idstringRule ID for the networkPolicy
networkpolicy.rules[0].specstringSpecifications of this policy rule
limits.enabledfalseEnable limitRange for this project
limits.rulesstringSpecifications of the limitRange resource
quotas.enabledfalseEnable quotas for this project
quotas.rulesstringSpecifications of the quotas resource
dockercfg.enabledfalseEnable the registry credentials Secrets of this project
dockercfg.list[][]List of the registry credentials to record
dockercfg.list[0].nameregistrycredsName of the generated S

Deploy project with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has project 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 chartproject is pinned at v21.3.418 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