Skip to content

Render deployment

Alberto Femenías Hermida edited this page Feb 16, 2021 · 7 revisions

Deployment

{{- define "foo.deploy.data" -}}

name: <name_of_the_deployment>
selector:  <selectors>
annotations: <anotations>
replicas: <n_replicas>

containers:
  - name: <name_of_the_container>
    image: ...
    command:  ...
    ...
    ports: ...

{{- end -}}

{{ include "ph.deployment.render" (include "foo.deploy.data" . | fromYaml ) }}

Prefapp-helm-render uses the same nomenclature as the standard k8s artifact, with the following exceptions:

ports

Instead of:

ports:
  - containerPort: 80

The render expects:

ports:
  - pod: 80

This decision will be explained in detail in the Render-service documentation.

env

The render expects the environment values to be added in 4 different ways:

env_literal
env_literal:
  VAR_NAME1: "value1"
  VAR_NAME2: "value2"
envFrom
envFrom:
  configmaps:
    - <configmap_artifact_name1>
    - <configmap_artifact_name2>

  secrets:
    - <secret_artifact_name1>
    - <secret_artifact_name2>
env_values_secret
env_values_secret:
  - secret: <secret_artifact_name>
    values:
      VAR_NAME1: SECRET_NAME1
      VAR_NAME2: SECRET_NAME2

env_values_configmap

env_values_configmap:
  - configmap: <configmap_artifact_name>
      values:
        VAR_NAME1: CONFIG_NAME1
        VAR_NAME2: CONFIG_NAME2

Clone this wiki locally