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

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

pvickery-ParamountCommerce
Copy link
Contributor

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

@Link- Link- self-assigned this Dec 4, 2024
@Link- Link- added the attention Requires attention label Dec 4, 2024
@Link- Link- added this to the gha-runner-scale-set-0.9.4 milestone Dec 4, 2024
@nikola-jokic nikola-jokic merged commit d4e3d2a into actions:master Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attention Requires attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants