NodeGroupConfiguration

Scope: Cluster
Version: v1alpha1

Executes bash scripts on nodes.

Read more in the module documentation.

  • spec
    object

    Required value

    • spec.bundles
      array of strings

      Required value

      Bundles for step execution. You can set '*' for selecting all bundles.

      Examples:

      bundles:
      - ubuntu-lts
      - centos-7
      
      bundles:
      - ubuntu-lts
      
      bundles:
      - "*"
      
      • Element of the array
        string

        Allowed values: ubuntu-lts, centos, debian, redos, rosa, astra, altlinux, opensuse, *

    • spec.content
      string

      Required value

      A bash script that does the same things you would do in a configuration step.

      You can use Go Template to generate a script.

      The list of parameters available for use in templates can be retrieved from the bashible-apiserver-context Secret as follows:

      kubectl -n d8-cloud-instance-manager get secrets bashible-apiserver-context -o jsonpath='{.data.input\.yaml}'| base64 -d
      

      For example:

      {{- range .nodeUsers }}
      echo 'Tuning environment for user {{ .name }}'
      # Some code for tuning user environment
      {{- end }}
      

      You can also use the pre-defined bashbooster commands in the script. For example:

      bb-event-on 'bb-package-installed' 'post-install'
      post-install() {
        bb-log-info "Setting reboot flag due to kernel was updated"
        bb-flag-set reboot
      }
      

      Example of using the proxy parameters of ClusterConfiguration resource:

      bb-set-proxy
      curl -I https://google.com
      bb-unset-proxy
      
      test-function-with-proxy() {
        bb-set-proxy
        trap bb-unset-proxy RETURN
        curl -I https://google.com
      }
      test-function-with-proxy
      
    • spec.nodeGroups
      array of strings

      Required value

      List of NodeGroups to apply the step for. You can set '*' for selecting all NodeGroups.

      Examples:

      nodeGroups:
      - master
      - worker
      
      nodeGroups:
      - worker
      
      nodeGroups:
      - "*"
      
    • spec.weight
      integer

      Order of the step execution.

      Default: 100