Skip to content

🐛 fix(go/v4,helm/v2-alpha): use 0644/0755 for generated files#5508

Merged
camilamacedo86 merged 1 commit intokubernetes-sigs:masterfrom
camilamacedo86:fix-permissions
Feb 27, 2026
Merged

🐛 fix(go/v4,helm/v2-alpha): use 0644/0755 for generated files#5508
camilamacedo86 merged 1 commit intokubernetes-sigs:masterfrom
camilamacedo86:fix-permissions

Conversation

@camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Feb 26, 2026

Closes: #5502

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 26, 2026
pkg/cli/cli.go Outdated

if modified != original {
err := afero.WriteFile(fs, path, []byte(modified), 0o755)
err := afero.WriteFile(fs, path, []byte(modified), 0o644)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below in pkg/machinery/scaffold.go, there are constants. Defining them in one place will create consistency and provide a single source of truth. No drifts in future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catcher 👍 Done


// Write the marshalled configuration
err = afero.WriteFile(s.fs, path, content, 0o600)
err = afero.WriteFile(s.fs, path, content, 0o644)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below in pkg/machinery/scaffold.go, there are constants. Defining them in one place will create consistency and provide a single source of truth. No drifts in future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catcher 👍 Done

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 26, 2026
@camilamacedo86 camilamacedo86 requested a review from v47 February 26, 2026 15:54
Makefile Outdated
check-sample-permissions: ## Fail if any file/dir under testdata or docs samples has wrong permissions (expect 0644/0755). bin/ and *.sh excluded.
@for d in $(SAMPLE_ROOTS); do \
test -d "$$d" || continue; \
bad=$$(find "$$d" -path '*/bin' -prune -o \( \( -type f ! -perm 0644 ! -name '*.sh' \) -o \( -type d ! -perm 0755 \) \) -print 2>/dev/null); \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if a *.sh file has the wrong permissions, how would we catch it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove that we have no longer sh files in the testdata.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@vitorfloriano
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 26, 2026
@camilamacedo86
Copy link
Member Author

/override coverage

@k8s-ci-robot
Copy link
Contributor

@camilamacedo86: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • coverage

Only the following failed contexts/checkruns were expected:

  • EasyCLA
  • netlify/kubebuilder/deploy-preview
  • pull-kubebuilder-e2e-k8s-1-33-0
  • pull-kubebuilder-e2e-k8s-1-34-0
  • pull-kubebuilder-e2e-k8s-1-35-0
  • pull-kubebuilder-test
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

Details

In response to this:

/override coverage

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2026
@vitorfloriano
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2026
@camilamacedo86 camilamacedo86 merged commit bb95ce2 into kubernetes-sigs:master Feb 27, 2026
15 of 17 checks passed
@camilamacedo86 camilamacedo86 deleted the fix-permissions branch February 27, 2026 15:57
camilamacedo86 added a commit that referenced this pull request Feb 27, 2026
* (infra/demos): Remove asciicinema demos

The asciicinema demos add tooling debt, maintenance burden, poor UX,
and provides little value to users, making it not worth the effort.

* fix(go/v4): CI lint by using make lint instead of golangci-lint-action so the custom binary (with logcheck plugin) is built and used.

* fix(helm/v2-alpha): use manager.replicas from values in chart template

Generated-by: Cursor/Claude

* ✨ (helm/v2-alpha): Add manager.envOverrides for CLI env overrides

* fix(helm/v2-alpha): use sigs.k8s.io/yaml for 2-space YAML indentation in generated value files

* 🌱 Bump goreleaser/goreleaser-action from 6 to 7

Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 6 to 7.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](goreleaser/goreleaser-action@v6...v7)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 fix: resolve panic when multiple plugins define the same flag (e.g. edit with go/v4 + helm) (#5506)

fix: resolve panic when multiple plugins define the same flag (e.g. edit with go/v4 + helm)

- Merge duplicate flags instead of binding twice; sync parsed value to all plugins in PreRunE.
- Aggregate flag help as "For plugin (key): desc AND for plugin (key): desc".
- Return a clear error when the same flag name is used with different types (e.g. bool vs string).

Generated-by: Cursor/Claude

* ✨ chore(go/v4): Upgrade cert-manager from 1.19.3 to 1.19.4 (#5509)

chore(go/v4): Upgrade cert-manager from 1.19.3 to 1.19.4

* 🌱 cleanup(docs): remove script no longer used to build samples under books (#5511)

cleanup(docs): remove script no longer used to build samples under books

* 🌱 chore: add yamllint config for 2-space indentation and Kubernetes YAML best practices (#5507)

chore: add yamllint config for 2-space indentation and Kubernetes YAML best practices

* 🌱 infra: Remove pkg/internal/validation (#5512)

infra: remove validation package

Package validation was copied from k8s.io/apimachinery/utils/validation to avoid adding a dependency. Considering that kubebuilder already depends on apimachinery, using the original package requires less maintainance.

* 🌱 Bump actions/upload-artifact from 6.0.0 to 7.0.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* 🐛 fix(go/v4,helm/v2-alpha): use 0644/0755 for generated files (#5508)

fix(go/v4,helm/v2-alpha): use 0644/0755 for generated files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Vitor Floriano <107767584+vitorfloriano@users.noreply.github.com>
Co-authored-by: Kubernetes Prow Robot <20407524+k8s-ci-robot@users.noreply.github.com>
Co-authored-by: v47 <victor.verg@hotmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
cmallikarjunah pushed a commit to cmallikarjunah/kubebuilder that referenced this pull request Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

helm/v2-alpha: inconsistent dist/chart file permissions

4 participants