...

Text file src/edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/staticpodscheduler/README.md

Documentation: edge-infra.dev/pkg/sds/ien/k8s/controllers/nodeagent/plugins/staticpodscheduler

     1# Adding a new static pod
     2
     31. Add your template manifest and config files to the [`templates`](templates) sub-packages ([more info](templates/README.md)).
     42. Add an environment variable that references your static pod image to the nodeagent [`daemonset-patch.yaml`](../../../../../../../../config/pallets/sds/nodeagent/dsds/daemonset-patch.yaml).
     5
     6e.g.
     7
     8```
     9        env:
    10		// Other environment variables
    11        - name: MY_STATIC_POD_IMAGE
    12          value: bzl://cmd/sds/path/to/mystaticpod:container_push
    13```
    14
    153. Add an init container that references your static pod image to the nodeagent [`daemonset-patch.yaml`](../../../../../../../../config/pallets/sds/nodeagent/dsds/daemonset-patch.yaml). The command for this init container should be something that does minimal work and exits quickly, such as a `version` sub-command that prints out the version and exits. The purpose of this init container is to ensure your static pod's image is pulled down to the node, since static pods don't have the pull secret available to pull images from the private repository.
    16
    17e.g.
    18
    19```
    20      initContainers:
    21	  // Other init containers
    22      - name: my-static-pod-image-init
    23        image: bzl://cmd/sds/path/to/mystaticpod:container_push
    24        args: ['version']
    25```
    26
    274. Map your image environment variable key to your manifest by adding a key mapping to the `imageKeys` map in [`pkg/render/images.go`](pkg/render/images.go) ([more info](pkg/render/README.md#defining-image-digest-locations))
    285. Add any required parameters that you may need that are not already present ([more info](pkg/render/README.md#adding-additional-parameters)).

View as plain text