Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim volume and container helpers in gha-runner-scale-set #3807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pvickery-ParamountCommerce

In gha-runner-scale-set, some newlines are being unnecessarily added to items in lists. This PR helps cleanup newlines added to template.spec.volumes and template.spec.containers.volumeMounts.

Here is an example using version 0.9.3. Below is the values.yaml file.

template:
  spec:
    containers:
      - name: test
        volumeMounts:
          - name: test
            mountPath: /path
            subPath: file
    volumes:
      - name: test
        secret:
          secretName: secret
          items:
            - key: file
              path: file

This was the resulting manifest for AutoscalingRunnerSet. There are newlines added in the items for template.spec.volumes and template.spec.containers.volumeMounts. The newlines are removed while maintaining proper indentation with this PR.

kind: AutoscalingRunnerSet
...
template:
  spec:
    volumes:
      - name: dind-sock
        emptyDir: {}
      - name: dind-externals
        emptyDir: {}
      
      - name: work
        emptyDir: {}
      
      - 
        name: test
        secret:
          items:
          - key: file
            path: file
          secretName: secret
          

    containers:
      - name: test
        volumeMounts:
          - 
            mountPath: /path
            name: test
            subPath: file
          - name: work
            mountPath: /home/runner/_work
          - name: dind-sock
            mountPath: /var/run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant