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

docs-fix: updated CONTRIBUTING.md #226

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 26 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
## We invite contributions to _kube-fledged_.
## 🚀 We Invite Contributions to Kube-Fledged!

👋 Welcome to the Kube-Fledged community! We're thrilled that you want to contribute. Here's how you can get involved:

* Submit an issue if you find a bug or interested in seeing a new feature/ enhancement implemented.
### 🐞 Found a Bug? Want a Cool New Feature?

* If you would like to submit a PR for an existing issue, please make a comment in the issue. The maintainer will review your request and if approved, the issue will be assigned to you.
- If you've stumbled upon a bug or have an idea for an awesome feature or enhancement, share it with us by opening an issue. We love hearing from you!

* Once the issue is assigned to you, start working on the issue.
### 🛠️ Ready to Contribute Code?

* Fork the project, develop and test your code.
- If you're eager to tackle an existing issue or implement a cool feature, let us know by commenting on the issue. The maintainer will give you the green light, and the issue will be yours to own!

* Submit a pull request against 'develop' branch. Ensure ALL CI checks are passed.
### 💻 Let's Get Coding!

* The maintainer will review and approve your pull request
- Once you're assigned to an issue, roll up your sleeves, and let the coding adventure begin!

### 🍴 Fork It, Code It, Test It!

- First things first, fork the project, and then dive into coding. Test your code thoroughly to ensure it's in tip-top shape.

### 🚀 Submit a Pull Request

- When you're ready to share your fantastic work, submit a pull request to the 'develop' branch. Make sure you've aced all CI checks.

### 🧐 Review and Approval

- The maintainer will give your pull request a thorough review. If everything looks splendid, you'll get that thumbs-up!

### 🏷️ Sprinkle Some Labels

- Feel free to add labels to your pull request if it helps categorize your contribution better.

✨ We're excited to have you on board, and we can't wait to see your fantastic contributions! Happy coding! ✨
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,17 @@ For more detailed description, go through _kube-fledged's_ [design proposal](doc

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests.

### Contributors

<a href="https://github.com/senthilrch/kube-fledged/graphs/contributors">
<img src="https://contrib.rocks/image?repo=senthilrch/kube-fledged" />
</a>

## Code of Conduct

Please read [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for details on our code of conduct, and how to report violations.


## License

This project is licensed under the Apache 2.0 License - see the [LICENSE.md](LICENSE.md) file for details
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details
12 changes: 10 additions & 2 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/golang/glog"
kubeinformers "k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"

// Uncomment the following line to load the gcp plugin (only required to authenticate against GKE clusters).
// _ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
Expand All @@ -45,6 +45,8 @@ var (
serviceAccountName string
imageDeleteJobHostNetwork bool
jobPriorityClassName string
kubeconfig string
masterURL string
//Default value for when `--job-retention-policy` flag is not set
canDeleteJob bool = true
criSocketPath string
Expand All @@ -56,7 +58,7 @@ func main() {
// set up signals so we handle the first shutdown signal gracefully
stopCh := signals.SetupSignalHandler()

cfg, err := rest.InClusterConfig()
cfg, err := clientcmd.BuildConfigFromFlags(masterURL, kubeconfig)
if err != nil {
glog.Fatalf("Error building kubeconfig: %s", err.Error())
}
Expand Down Expand Up @@ -96,6 +98,12 @@ func main() {
}

func init() {

flag.StringVar(&kubeconfig, "kubeconfig", "",
"Path to a kubeconfig. Only required if out-of-cluster.")
flag.StringVar(&masterURL, "master", "",
"The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")

flag.DurationVar(&imagePullDeadlineDuration, "image-pull-deadline-duration", time.Minute*5, "Maximum duration allowed for pulling an image. After this duration, image pull is considered to have failed")
flag.DurationVar(&imageCacheRefreshFrequency, "image-cache-refresh-frequency", time.Minute*15, "The image cache is refreshed periodically to ensure the cache is up to date. Setting this flag to 0s will disable refresh")
flag.StringVar(&imagePullPolicy, "image-pull-policy", "IfNotPresent", "Image pull policy for pulling images into the cache. Possible values are 'IfNotPresent' and 'Always'. Default value is 'IfNotPresent'. Images with no or ':latest' tag are always pulled")
Expand Down
4 changes: 2 additions & 2 deletions cmd/webhook-server/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"crypto/tls"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"

"github.com/golang/glog"
Expand Down Expand Up @@ -103,7 +103,7 @@ func delegateV1beta1AdmitToV1(f admitv1Func) admitv1beta1Func {
func serve(w http.ResponseWriter, r *http.Request, admit admitHandler) {
var body []byte
if r.Body != nil {
if data, err := ioutil.ReadAll(r.Body); err == nil {
if data, err := io.ReadAll(r.Body); err == nil {
body = data
}
}
Expand Down
4 changes: 2 additions & 2 deletions e2etest/utils/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package utils

import (
"io/ioutil"
"os"
"strings"
"testing"
)
Expand All @@ -26,7 +26,7 @@ import (
func Sed(t *testing.T, old, new, filePath string) string {
t.Helper()

oldFileByteSlice, err := ioutil.ReadFile(filePath)
oldFileByteSlice, err := os.ReadFile(filePath)
if err != nil {
t.Fatalf("failed to read file %s", filePath)
}
Expand Down
6 changes: 0 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ require (
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
github.com/Masterminds/squirrel v1.5.3 // indirect
github.com/PuerkitoBio/purell v1.2.0 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
Expand Down Expand Up @@ -112,15 +110,13 @@ require (
go.etcd.io/etcd/api/v3 v3.5.5 // indirect
go.starlark.net v0.0.0-20221019144234-6ce4ce37fe55 // indirect
golang.org/x/crypto v0.0.0-20221012134737-56aed061732a // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/term v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/time v0.1.0 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221018160656-63c7b68cfc55 // indirect
google.golang.org/grpc v1.50.1 // indirect
Expand All @@ -129,9 +125,7 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/cli-runtime v0.25.3 // indirect
k8s.io/code-generator v0.25.3 // indirect
k8s.io/component-base v0.25.3 // indirect
k8s.io/gengo v0.0.0-20211129171323-c02415ce4185 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
k8s.io/kubectl v0.25.3 // indirect
Expand Down