Skip to content

Commit dfed73e

Browse files
authored
Merge pull request #27 from fluxcd/prune-utils
⚠️ Breaking change: Reduce the project scope to `kstatus` only
2 parents a158db5 + f88cf83 commit dfed73e

256 files changed

Lines changed: 176 additions & 45694 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Copyright 2023 The Flux Authors.
2-
# SPDX-License-Identifier: Apache-2.0
3-
41
name: test
52

63
on:
@@ -16,27 +13,21 @@ jobs:
1613
permissions:
1714
contents: read
1815
steps:
19-
-
20-
name: Checkout
21-
uses: actions/checkout@v4
22-
-
23-
name: Set up Go
24-
uses: actions/setup-go@v4
16+
- name: Checkout
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
- name: Setup Go
19+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2520
with:
26-
go-version: 1.25.x
21+
go-version: 1.26.x
2722
cache-dependency-path: |
2823
**/go.sum
2924
**/go.mod
30-
-
31-
name: Test
32-
run: |
33-
make tidy
34-
make test
35-
-
36-
name: Check if working tree is dirty
25+
- name: Test
26+
run: make
27+
- name: Check if working tree is dirty
3728
run: |
3829
if [[ $(git diff --stat) != '' ]]; then
3930
git diff
40-
echo 'run make test and commit changes'
31+
echo 'run make and commit changes'
4132
exit 1
4233
fi

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ vendor/
1414

1515
# go artifacts
1616
cover.out
17+
18+
# local binaries
19+
bin/

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Code of Conduct
2+
3+
The Flux project follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

CONTRIBUTING.md

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
# Contributing Guidelines
1+
# Contributing
22

3-
Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://git.k8s.io/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt:
3+
This project is [Apache 2.0 licensed](LICENSE) and accepts contributions
4+
via GitHub pull requests. This document outlines some of the conventions on
5+
to make it easier to get your contribution accepted.
46

5-
_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._
7+
We gratefully welcome improvements to issues and documentation as well as to
8+
code.
69

7-
## Getting Started
10+
## Certificate of Origin
811

9-
We have full documentation on how to get started contributing here:
12+
By contributing to this project you agree to the Developer Certificate of
13+
Origin (DCO). This document was created by the Linux Kernel community and is a
14+
simple statement that you, as a contributor, have the legal right to make the
15+
contribution. No action from you is required, but it's a good idea to see the
16+
[DCO](DCO) file for details before you start contributing code to FluxCD
17+
pkg.
1018

11-
<!---
12-
If your repo has certain guidelines for contribution, put them here ahead of the general k8s resources
13-
-->
19+
## Communications
1420

15-
- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests
16-
- [Kubernetes Contributor Guide](https://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](https://git.k8s.io/community/contributors/guide#contributing)
17-
- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet/README.md) - Common resources for existing developers
21+
The project uses Slack: To join the conversation, simply join the
22+
[CNCF](https://slack.cncf.io/) Slack workspace and use the
23+
[#flux](https://cloud-native.slack.com/messages/flux/) channel.
1824

19-
## Mentorship
25+
The developers use a mailing list to discuss development as well.
26+
Simply subscribe to [flux-dev on cncf.io](https://lists.cncf.io/g/cncf-flux-dev)
27+
to join the conversation (this will also add an invitation to your
28+
Google calendar for our [Flux
29+
meeting](https://docs.google.com/document/d/1l_M0om0qUEN_NNiGgpqJ2tvsF2iioHkaARDeh6b70B0/edit#)).
2030

21-
- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers!
31+
### How to run the test suite
2232

23-
## Contact Information
33+
You can run the unit tests by simply doing
2434

25-
- [Slack channel](https://kubernetes.slack.com/messages/sig-cli)
26-
- [Mailing list](https://groups.google.com/forum/#!forum/kubernetes-sig-cli)
35+
```bash
36+
make test
37+
```
2738

28-
## Setup a Dev Environment
39+
## Acceptance policy
2940

30-
- install [go](https://golang.org/doc/install)
31-
- `export GO111MODULE=on`
32-
- install [wire](https://github.com/google/wire/)
41+
These things will make a PR more likely to be accepted:
3342

34-
## Build and Test
43+
- a well-described requirement
44+
- tests for new code
45+
- tests for old code!
46+
- new code and tests follow the conventions in old code and tests
47+
- a good commit message (see below)
48+
- all code must abide [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
49+
- names should abide [What's in a name](https://talks.golang.org/2014/names.slide#1)
50+
- code must build on both Linux and Darwin, via plain `go build`
51+
- code should have appropriate test coverage and tests should be written
52+
to work with `go test`
3553

36-
1. `go generate`
37-
- Generates the `wire_gen.go` files
38-
1. `go test ./...`
39-
- Test the
40-
1. `golint -min_confidence 0.9 ./...`
41-
- Look for errors
42-
1. `go build`
43-
- Build the binary
54+
In general, we will merge a PR once one maintainer has endorsed it.
55+
For substantial changes, more people may become involved, and you might
56+
get asked to resubmit the PR or divide the changes into more than one PR.
4457

45-
## Dependency Injection
58+
### Format of the Commit Message
4659

47-
This repo uses Dependency Injection for wiring together the Commands. See the
48-
[wire tutorial](https://github.com/google/wire/tree/master/_tutorial) for more on DI.
60+
For Source Controller we prefer the following rules for good commit messages:
4961

50-
## Adding a Command
62+
- Limit the subject to 50 characters and write as the continuation
63+
of the sentence "If applied, this commit will ..."
64+
- Explain what and why in the body, if more than a trivial change;
65+
wrap it at 72 characters.
5166

52-
1. Add a new package for your cobra command under `cmd/`
53-
- e.g. `kubectl apply status` would be added under `cmd/apply/status`
54-
- Add it to the parent command
55-
- Copy an existing command as an example
56-
1. Add a new package that contains the library for your command under `internal/pkg`
57-
- e.g. `kubectl apply status` library would be added under `internal/pkg/status`
58-
- Invoke it from the command you added
59-
- Copy an existing package as an example
60-
1. Add the DI wiring for your library
61-
- Edit `internal/pkg/wiring/wiring.go` - Add your struct to the `ProviderSet` list
62-
- Edit `internal/pkg/wiring/wire.go` - Add an `Initialize` function for you struct
63-
64-
## Adding a Library (non-internal)
65-
66-
1. Add a new package for your library under `pkg`
67-
1. Add a new package that contains the implementation under `internal/pkg`
68-
- Invoke it from your public package
67+
The [following article](https://chris.beams.io/posts/git-commit/#seven-rules)
68+
has some more helpful advice on documenting your work.

DCO

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Developer Certificate of Origin
2+
Version 1.1
3+
4+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
5+
660 York Street, Suite 102,
6+
San Francisco, CA 94110 USA
7+
8+
Everyone is permitted to copy and distribute verbatim copies of this
9+
license document, but changing it is not allowed.
10+
11+
12+
Developer's Certificate of Origin 1.1
13+
14+
By making a contribution to this project, I certify that:
15+
16+
(a) The contribution was created in whole or in part by me and I
17+
have the right to submit it under the open source license
18+
indicated in the file; or
19+
20+
(b) The contribution is based upon previous work that, to the best
21+
of my knowledge, is covered under an appropriate open source
22+
license and I have the right under that license to submit that
23+
work with modifications, whether created in whole or in part
24+
by me, under the same open source license (unless I am
25+
permitted to submit under a different license), as indicated
26+
in the file; or
27+
28+
(c) The contribution was provided directly to me by some other
29+
person who certified (a), (b) or (c) and I have not modified
30+
it.
31+
32+
(d) I understand and agree that this project and the contribution
33+
are public and that a record of the contribution (including all
34+
personal information I submit with it, including my sign-off) is
35+
maintained indefinitely and may be redistributed consistent with
36+
this project or the open source license(s) involved.

LICENSE_TEMPLATE

Lines changed: 0 additions & 2 deletions
This file was deleted.

LICENSE_TEMPLATE_GO

Lines changed: 0 additions & 2 deletions
This file was deleted.

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The maintainers are generally available in Slack at
2+
https://cloud-native.slack.com in #flux (https://cloud-native.slack.com/messages/CLAJ40HV3)
3+
(obtain an invitation at https://slack.cncf.io/).
4+
5+
The maintainers of this project as listed in
6+
7+
https://github.com/fluxcd/community/blob/main/CORE-MAINTAINERS

0 commit comments

Comments
 (0)