From 4afc5ecd887652aa8d2972e16340064f7d6ad77c Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Mon, 20 Apr 2020 15:01:03 +0300 Subject: [PATCH] Release v0.0.1-alpha.1 --- .github/workflows/release.yml | 2 +- CHANGELOG.md | 9 ++++ CODE_OF_CONDUCT.md | 3 ++ CONTRIBUTING.md | 73 +++++++++++++++++++++++++++++++ DCO | 36 +++++++++++++++ MAINTAINERS | 7 +++ README.md | 20 +++------ config/manager/kustomization.yaml | 2 +- 8 files changed, 135 insertions(+), 17 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 DCO create mode 100644 MAINTAINERS diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a5765c7..04683e15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: mkdir -p config/release cp config/default/* config/release cd config/release - kustomize edit set image fluxcd/source-controller=fluxcd/kustomize-controller:${{ steps.get_version.outputs.VERSION }} + kustomize edit set image fluxcd/kustomize-controller=fluxcd/kustomize-controller:${{ steps.get_version.outputs.VERSION }} kustomize build . > kustomize-controller.yaml - name: Push image uses: docker/build-push-action@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..fa1d5a5a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +All notable changes to this project are documented in this file. + +## 0.0.1-alpha.1 (2020-04-20) + +This is the first alpha release of kustomize controller. +The controller is an implementation of the +[kustomize.fluxcd.io/v1alpha1](https://github.com/fluxcd/kustomize-controller/tree/master/docs/spec/v1alpha1) API. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..bedd452f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,3 @@ +## Code of Conduct + +Kustomize Controller follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..f72b5f43 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,73 @@ +# Contributing + +Kustomize Controller is [Apache 2.0 licensed](LICENSE) and accepts contributions +via GitHub pull requests. This document outlines some of the conventions on +to make it easier to get your contribution accepted. + +We gratefully welcome improvements to issues and documentation as well as to +code. + +## Certificate of Origin + +By contributing to this project you agree to the Developer Certificate of +Origin (DCO). This document was created by the Linux Kernel community and is a +simple statement that you, as a contributor, have the legal right to make the +contribution. No action from you is required, but it's a good idea to see the +[DCO](DCO) file for details before you start contributing code to Kustomize +Controller. + +## Communications + +The project uses Slack: To join the conversation, simply join the +[CNCF](https://slack.cncf.io/) Slack workspace and use the +[#flux](https://cloud-native.slack.com/messages/flux/) channel. + +The developers use a mailing list to discuss development as well. +Simply subscribe to [flux-dev on cncf.io](https://lists.cncf.io/g/cncf-flux-dev) +to join the conversation (this will also add an invitation to your +Google calendar for our [Flux +meeting](https://docs.google.com/document/d/1l_M0om0qUEN_NNiGgpqJ2tvsF2iioHkaARDeh6b70B0/edit#)). + +### How to run the test suite + +Prerequisites: +* go >= 1.13 +* kubebuilder >= 2.3 +* kustomize >= 3.1 + +You can run the unit tests by simply doing + +```bash +make test +``` + +## Acceptance policy + +These things will make a PR more likely to be accepted: + +- a well-described requirement +- tests for new code +- tests for old code! +- new code and tests follow the conventions in old code and tests +- a good commit message (see below) +- all code must abide [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) +- names should abide [What's in a name](https://talks.golang.org/2014/names.slide#1) +- code must build on both Linux and Darwin, via plain `go build` +- code should have appropriate test coverage and tests should be written + to work with `go test` + +In general, we will merge a PR once one maintainer has endorsed it. +For substantial changes, more people may become involved, and you might +get asked to resubmit the PR or divide the changes into more than one PR. + +### Format of the Commit Message + +For Kustomize Controller we prefer the following rules for good commit messages: + +- Limit the subject to 50 characters and write as the continuation + of the sentence "If applied, this commit will ..." +- Explain what and why in the body, if more than a trivial change; + wrap it at 72 characters. + +The [following article](https://chris.beams.io/posts/git-commit/#seven-rules) +has some more helpful advice on documenting your work. diff --git a/DCO b/DCO new file mode 100644 index 00000000..716561d5 --- /dev/null +++ b/DCO @@ -0,0 +1,36 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/MAINTAINERS b/MAINTAINERS new file mode 100644 index 00000000..49f1e4bf --- /dev/null +++ b/MAINTAINERS @@ -0,0 +1,7 @@ +The maintainers are generally available in Slack at +https://cloud-native.slack.com in #flux (https://cloud-native.slack.com/messages/CLAJ40HV3) +(obtain an invitation at https://slack.cncf.io/). + +In alphabetical order: + +Stefan Prodan, Weaveworks (github: @stefanprodan, slack: stefanprodan) diff --git a/README.md b/README.md index 3dc5ccd0..56b537a2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # kustomize-controller [![e2e](https://github.com/fluxcd/kustomize-controller/workflows/e2e/badge.svg)](https://github.com/fluxcd/kustomize-controller/actions) +[![report](https://goreportcard.com/badge/github.com/fluxcd/kustomize-controller)](https://goreportcard.com/report/github.com/fluxcd/kustomize-controller) +[![license](https://img.shields.io/github/license/fluxcd/kustomize-controller.svg)](https://github.com/fluxcd/kustomize-controller/blob/master/LICENSE) +[![release](https://img.shields.io/github/release/fluxcd/kustomize-controller/all.svg)](https://github.com/fluxcd/kustomize-controller/releases) The kustomize-controller is a continuous delivery (CD) tool for Kubernetes. The controller runs CD pipelines inside the cluster for workloads and infrastructure manifests @@ -37,9 +40,8 @@ kubectl apply -f- Install kustomize-controller with: ```bash -git clone https://github.com/fluxcd/kustomize-controller -cd kustomize-controller -make docker-build docker-push dev-deploy IMG=your-docker-hub-username/kustomize-controller:test +kustomize build https://github.com/fluxcd/kustomize-controller//config/default?ref=v0.0.1-alpha.1 \ +kubectl apply -f- ``` ### Define a Git repository source @@ -241,15 +243,3 @@ spec: Based on the above definition, the kustomize controller will build and apply a kustomization that matches the semver range set in the Git repository manifest. -## GitOps workflow - -Example: -* create a `GitRepository` per app (example repo [podinfo-deploy](https://github.com/stefanprodan/podinfo-deploy)) -* create a `Kustomization` per app/environment -* push changes to a kustomize overlay in git -* source controller pulls the changes from git and creates an artifact -* kustomize controller fetches the latest artifact -* kustomize controller builds the overlay manifest and applies it on the cluster -* push a git tag in semver format -* source controller pulls the git tag and creates an artifact -* kustomize controller fetches the artifact and applies it to production diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 84b80e6d..1dfbd1e9 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -6,4 +6,4 @@ resources: images: - name: fluxcd/kustomize-controller newName: fluxcd/kustomize-controller - newTag: latest + newTag: 0.0.1-alpha.1