project
by startxfr
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 nameStartx default project, requesterstartx) - 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 (hardsection, most values at0): 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.yamlcreatesdemo-hpa,values-demo.yamlcreatesdemo; the exception isvalues-demo-example.yaml, projectexample-project) withcontext.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-cdf-poc.yaml : project
cdf, environmentinfra, enabled blocks: project, rbac - values-prgmk-ada.yaml : project
ada, environmentdevel, enabled blocks: project, rbac - values-startx-argocd.yaml : project
startx-argocd, environmentdemo, no block enabled (project.enabled: false, context and project name only) - values-startx-gitops.yaml : project
openshift-gitops, environmentdemo, no block enabled (project.enabled: false, context and project name only) - values-startx-quay.yaml : project
startx-quay, environmentdemo, enabled blocks: project, rbac, networkpolicy, limits, quotas - values-startx-ubisoft.yaml : project
ubisoft-user, environmentubisoft, enabled blocks: project, rbac - values-startx-vault.yaml : project
startx-vault, environmentdemo, enabled blocks: project - values-startx-workspaces.yaml : project
openshift-workspaces, environmentdemo, enabled blocks: project, rbac - values-startx.yaml : project
startx, environmentdemo, no block enabled (project.enabled: false, context and project name only) - values-startx_noinfra-gitops.yaml : project
openshift-gitops, environmentdemo, no block enabled (project.enabled: false, context and project name only) - values-startx_noinfra-vault.yaml : project
startx-vault, environmentdemo, enabled blocks: project - values-startx_noinfra.yaml : project
startx, environmentdemo, no block enabled (project.enabled: false, context and project name only)
- values-cdf-poc.yaml : project
Values dictionary
context values dictionary
| Key | Default | Description |
|---|---|---|
| context.scope | default | Name of the global scope for this application (organizational tenant) |
| context.cluster | localhost | Name of the cluster running this application (platform tenant) |
| context.environment | dev | Name of the environment for this application (ex: dev, factory, preprod or prod) |
| context.component | demo | Component name of this application (logical tenant) |
| context.app | project | Application name (functional tenant, default use Chart name) |
| context.version | 0.0.1 | Version name of this application (default use Chart appVersion) |
project values dictionary
| Key | Default | Description |
|---|---|---|
| project.type | project | Define the type of tenant to create (project or namespace) |
| project.name | default | Name of the project |
| project.display_name | default | Display name of the project (only for project) |
| project.description | default | Description of the project (only for project) |
| rbac.enabled | false | Enable RBAC default for this project |
| rbac.groups[] | [] | List groups to authorize on this project |
| rbac.groups[0].id | mygroup | Group ID for roleBinding |
| rbac.groups[0].name | mygroup_example | Group name for roleBinding |
| rbac.groups[0].role | view | Role to use for this group roleBinding |
| rbac.users[] | [] | List groups to authorize on this project |
| rbac.users[0].id | myuser | User ID for roleBinding |
| rbac.users[0].name | myuser_example | User name for roleBinding |
| rbac.users[0].role | view | Role to use for this user roleBinding |
| networkpolicy.enabled | false | Enable NetworkPolicy default for this project |
| networkpolicy.rules[] | [] | List group to create |
| networkpolicy.rules[0].id | string | Rule ID for the networkPolicy |
| networkpolicy.rules[0].spec | string | Specifications of this policy rule |
| limits.enabled | false | Enable limitRange for this project |
| limits.rules | string | Specifications of the limitRange resource |
| quotas.enabled | false | Enable quotas for this project |
| quotas.rules | string | Specifications of the quotas resource |
| dockercfg.enabled | false | Enable the registry credentials Secrets of this project |
| dockercfg.list[] | [] | List of the registry credentials to record |
| dockercfg.list[0].name | registrycreds | Name 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartproject is pinned at v21.3.418 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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