Skip to content

Projects and components

OpenChoreo explains the basic concepts under Projects and Components. This page covers what differs or is added on Parkdeck.

Projects

A project groups the components of an application and is the unit for access (Keycloak group /apps/<project>), hostnames (one hostname per project and environment) and resources (quota per environment).

Projects are created by the platform team (see Getting started). Every project gets one namespace per environment with a resource quota and defaults for containers that declare no resources themselves:

Quota per environment Default
CPU requests / limits 4 / 8
Memory requests / limits 8Gi / 16Gi
Pods 50
PersistentVolumeClaims / storage 10 / 50Gi
max. per container 2 CPU, 4Gi

If that is not enough, the platform team can raise the values per project or per environment.

Component types

Type For Default path if not set Strip prefix (default)
deployment/web-application Web UIs, anything browsers load directly /<component> no
deployment/service APIs and other services with endpoints /<component>-<endpoint> yes

Both types build with dockerfile-builder (recommended) or with buildpacks (paketo-buildpacks-builder, gcp-buildpacks-builder; for service also ballerina-buildpack-builder), run as a Deployment with replicas: 1, 100m CPU and 256Mi memory by default, and pull their image from the internal registry.

A service needs at least one endpoint, a web-application at least one HTTP endpoint.

A component as YAML

In the portal you create components with a form. The same as a resource — this is what a typical web application looks like:

apiVersion: openchoreo.dev/v1alpha1
kind: Component
metadata:
  name: web
  namespace: onconnect
spec:
  owner:
    projectName: myproject
  componentType:
    kind: ClusterComponentType
    name: deployment/web-application
  autoDeploy: true               # every successful build goes to development
  parameters:
    publish:
      - endpoint: http           # name from workload.yaml
        path: /                  # path below the project hostname
  workflow:
    kind: ClusterWorkflow
    name: dockerfile-builder
    parameters:
      repository:
        url: https://gitlab.ccc-onconnect.de/onconnect/apps/myproject.git
        secretRef: git-myproject
        appPath: .
        revision:
          branch: main
      docker:
        context: .
        filePath: ./Dockerfile
      buildArgs: []              # see "Build"
      buildEnv: []
  traits: []                     # see "Login and traits"

Parameter publish

Defines per endpoint the path it appears under below the project hostname:

Field Meaning
endpoint Name of the endpoint from workload.yaml
path Path, e.g. / or /api
stripPrefix Remove the prefix before forwarding to the container. Default: true for service, false for web-application.

Endpoints without an entry fall back to their basePath from workload.yaml, otherwise to the generated default path (table above). Details under Endpoints and hostnames.

Several components in one project

All components of a project share one hostname per environment and are separated by paths, e.g. frontend under / and API under /api. Each path may only be used once.

If several components live in the same repository, set repository.appPath and docker.context / docker.filePath of each component to its subdirectory.

Further reading