diff --git a/.changie.yaml b/.changie.yaml
new file mode 100755
index 00000000..b3c6695c
--- /dev/null
+++ b/.changie.yaml
@@ -0,0 +1,16 @@
+changesDir: changes
+unreleasedDir: unreleased
+headerPath: header.tpl.md
+versionHeaderPath: ""
+changelogPath: CHANGELOG.md
+versionExt: md
+versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
+kindFormat: '### {{.Kind}}'
+changeFormat: '* {{.Body}}'
+kinds:
+- label: Feature
+- label: Refactor
+- label: Deprecated
+- label: Removed
+- label: Bugfix
+- label: Security
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 31d65368..7b8c6b78 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -11,6 +11,8 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0
+ - name: Get the tag name
+ run: echo "TAG=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v2
with:
@@ -31,7 +33,7 @@ jobs:
env:
AWS_REGION: us-east-1
- name: Cache Docker Layers
- run: docker pull public.ecr.aws/opslevel/kubectl-opslevel:v0.4.6 || true
+ run: docker pull public.ecr.aws/opslevel/kubectl-opslevel:v0.6.0 || true
# - name: Write Release Notes
# run: |
# curl -L https://github.com/git-chglog/git-chglog/releases/download/v0.15.0/git-chglog_0.15.0_linux_amd64.tar.gz | tar xz -C /usr/local/bin git-chglog
@@ -41,7 +43,7 @@ jobs:
uses: goreleaser/goreleaser-action@v2
with:
version: latest
- args: release --rm-dist --release-notes=RELEASE_NOTES
+ args: release --rm-dist --release-notes=../changes/${{ env.TAG }}.md
workdir: ./src
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e4298ea3..c231bc25 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,18 +1,20 @@
+# Changelog
+All notable changes to this project will be documented in this file.
-
-## [v0.6.0] - 2021-10-16
-### Feature
-- add --batch flag to `service reconcile` to configure max amount of k8s resources to process with jq to help speedup initial startup
-- enable k8s controller mode with new command `service reconcile`
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and is generated by [Changie](https://github.com/miniscruff/changie).
+
+## [v0.6.1] - 2021-10-26
+### Bugfix
+* skipover duplicate keys in tags.assign when merging service data due to overlapping aliases
+[v0.6.1]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.6.0...v0.6.1
-
## [v0.5.1] - 2021-10-04
### Bugfix
- 0.5.0 docker image didn't run after refactor
-
## [v0.5.0] - 2021-10-04
### Bugfix
- fix docker image build to have latest jq binary installed
@@ -26,7 +28,6 @@
- remove functionality of `account` commands and direct user to our official CLI
-
## [v0.4.9] - 2021-09-29
### Bugfix
- bubble up JQ errors are warning logs to help diagnose problems
@@ -40,13 +41,11 @@
- only include auto alias `k8s:-` if no alias results were found
-
## [v0.4.8] - 2021-09-20
### Bugfix
- skip over aliases that are empty strings as they are not valid to register
-
## [v0.4.7] - 2021-09-09
### Docs
- improve readme and add a troubleshooting section
@@ -60,7 +59,6 @@
- convert prefered environment variable prefix from `OL_` to `OPSLEVEL_` but still support old prefix
-
## [v0.4.6] - 2021-08-08
### Bugfix
- JSON-Schema has incorrect case on fields because of missing JSON struct tags
@@ -71,10 +69,8 @@
- improve `service import` performance by applying concurrency to processing service data into API calls
-
## [v0.4.5] - 2021-08-01
-
## [v0.4.5-rc.1] - 2021-08-01
### Bugfix
- bubble up k8s client errors
@@ -88,14 +84,12 @@
- change release process to use goreleaser for docker images too
-
## [v0.4.4] - 2021-07-22
### Bugfix
- fix index lookup error when a service field is not configured in a selector resulting in a empty lookup array
- fix logic around aggregating services so that multiple import selectors work
-
## [v0.4.3] - 2021-07-21
### Bugfix
- properly handle jq expressions that return ‘empty’ rather then null now that we batch expression operations
@@ -104,7 +98,6 @@
- upgrade jq from 1.4 to 1.6 ([#58](https://github.com/OpsLevel/kubectl-opslevel/issues/58))
-
## [v0.4.2] - 2021-07-14
### Docs
- simplify install instructions to use homebrew
@@ -115,7 +108,6 @@
- implement ability to run JQ statements on arrays of resources to speed up processing when retrieving 100’s of resources from Kubernetes
-
## [v0.4.1] - 2021-07-10
### Refactor
- switch to goreleaser for publishing
@@ -125,7 +117,6 @@
- Extract Documentation to OpsLevel Website
-
## [v0.4.0] - 2021-06-25
### Docs
- update readme to use new opslevel AWS ECR alias
@@ -143,7 +134,6 @@
- bump config version to support query any resource kind in the cluster
-
## [v0.3.1-beta.1] - 2021-06-13
### Bugfix
- protect against empty alias value
@@ -160,7 +150,6 @@
- add kubernetes deploy instructions that link to the helm chart
-
## [v0.3.0.beta1] - 2021-05-29
### Bugfix
- support all auth methods for kubeconfig by importing the auth package
@@ -188,7 +177,6 @@
- change version command to just print out the version rather then using a log statement
-
## [v0.2.0] - 2021-05-22
### Bugfix
- flag `—api-token` did not work but the environment variable did
@@ -213,7 +201,6 @@
- move HasTool check to opslevel-go and validate existance with environment not url to allow for updating the url of a tool
-
## [v0.1.3] - 2021-05-16
### Chore
- update opslevel-go to 0.1.3
@@ -238,7 +225,6 @@
- extract opslevel api client library to opslevel-go ([#8](https://github.com/OpsLevel/kubectl-opslevel/issues/8))
-
## [v0.1.2] - 2021-05-08
### Chore
- Init Changelog
@@ -257,13 +243,10 @@
- Support creating tools on newly created service entries
-
## [v0.1.1] - 2021-04-22
-
## [v0.1.0] - 2021-04-22
-
## v0.0.1 - 2021-03-25
[v0.6.0]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.5.1...v0.6.0
@@ -286,4 +269,4 @@
[v0.1.3]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.1.2...v0.1.3
[v0.1.2]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.1.1...v0.1.2
[v0.1.1]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.1.0...v0.1.1
-[v0.1.0]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.0.1...v0.1.0
+[v0.1.0]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.0.1...v0.1.0
\ No newline at end of file
diff --git a/changes/header.tpl.md b/changes/header.tpl.md
new file mode 100755
index 00000000..988ff608
--- /dev/null
+++ b/changes/header.tpl.md
@@ -0,0 +1,5 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and is generated by [Changie](https://github.com/miniscruff/changie).
\ No newline at end of file
diff --git a/changes/unreleased/.gitkeep b/changes/unreleased/.gitkeep
new file mode 100755
index 00000000..e69de29b
diff --git a/changes/v0.6.0.md b/changes/v0.6.0.md
new file mode 100644
index 00000000..c81e1f26
--- /dev/null
+++ b/changes/v0.6.0.md
@@ -0,0 +1,260 @@
+## [v0.5.1] - 2021-10-04
+### Bugfix
+- 0.5.0 docker image didn't run after refactor
+
+
+## [v0.5.0] - 2021-10-04
+### Bugfix
+- fix docker image build to have latest jq binary installed
+
+### Docs
+- fix documentation of workers environment variable
+- update layout of readme based on enduser feedback
+
+### Refactor
+- upgrade opslevel-go to 0.4.0 and set new graphql custom user agent
+- remove functionality of `account` commands and direct user to our official CLI
+
+
+## [v0.4.9] - 2021-09-29
+### Bugfix
+- bubble up JQ errors are warning logs to help diagnose problems
+- tag mutations for a service were being run in parallel but should have been serial
+- Deprecated selector "labels" but used incorrect spelling of labels in the json tags
+
+### Feature
+- improve client side service deduplication which prevents a class of bugs with parallel API calls - also makes `service preview` output more representative of actual results
+
+### Refactor
+- only include auto alias `k8s:-` if no alias results were found
+
+
+## [v0.4.8] - 2021-09-20
+### Bugfix
+- skip over aliases that are empty strings as they are not valid to register
+
+
+## [v0.4.7] - 2021-09-09
+### Docs
+- improve readme and add a troubleshooting section
+
+### Feature
+- add ability to specify a list of namespaces so the tool does not need permissions to list namespaces
+- add ability to override OpsLevel API URL
+- adds support for reading api tokens from the filesystem using the argument `--api-token-path`
+
+### Refactor
+- convert prefered environment variable prefix from `OL_` to `OPSLEVEL_` but still support old prefix
+
+
+## [v0.4.6] - 2021-08-08
+### Bugfix
+- JSON-Schema has incorrect case on fields because of missing JSON struct tags
+
+### Feature
+- improve performance of `service import` by using goroutines for all followon API calls (assign tags, assign tools, etc) after service create/update
+- improve performance of `service import` by switching TagAssign to use the batch call rather then 1 by 1
+- improve `service import` performance by applying concurrency to processing service data into API calls
+
+
+## [v0.4.5] - 2021-08-01
+
+## [v0.4.5-rc.1] - 2021-08-01
+### Bugfix
+- bubble up k8s client errors
+
+### Feature
+- add command to generate shell completion scripts for [bash|zsh|fish|powershell]
+- add command `config schema` for generating the jsonschema for the configuration file
+- allow specifying a sample count on `service preview` to limit the amount of data returned
+
+### Refactor
+- change release process to use goreleaser for docker images too
+
+
+## [v0.4.4] - 2021-07-22
+### Bugfix
+- fix index lookup error when a service field is not configured in a selector resulting in a empty lookup array
+- fix logic around aggregating services so that multiple import selectors work
+
+
+## [v0.4.3] - 2021-07-21
+### Bugfix
+- properly handle jq expressions that return ‘empty’ rather then null now that we batch expression operations
+
+### Feature
+- upgrade jq from 1.4 to 1.6 ([#58](https://github.com/OpsLevel/kubectl-opslevel/issues/58))
+
+
+## [v0.4.2] - 2021-07-14
+### Docs
+- simplify install instructions to use homebrew
+
+### Feature
+- switch exclude filters to use JQ multiParser to increase performance on filtering resources
+- use new multiParse JQ processing when processing the service fields to increase performance when working with 100’s of resources in Kubernetes
+- implement ability to run JQ statements on arrays of resources to speed up processing when retrieving 100’s of resources from Kubernetes
+
+
+## [v0.4.1] - 2021-07-10
+### Refactor
+- switch to goreleaser for publishing
+
+### Reverts
+- Revert "Extract Documentation to OpsLevel Website"
+- Extract Documentation to OpsLevel Website
+
+
+## [v0.4.0] - 2021-06-25
+### Docs
+- update readme to use new opslevel AWS ECR alias
+- update sample configuration file in readme to reflect config version 1.1.0
+- switch demo to asciinema
+- move readme documentation to OpsLevel website
+
+### Feature
+- add ability to filter resources based on jq expressions that return truthy
+- add config validation messages for new selector excludes format
+- add config selector validation to help user upgrade from 1.0.0 -> 1.1.0 with helpful messages
+- support targeting ANY k8s resource in the cluster
+
+### Refactor
+- bump config version to support query any resource kind in the cluster
+
+
+## [v0.3.1-beta.1] - 2021-06-13
+### Bugfix
+- protect against empty alias value
+- protect against empty key or value in tag assign and create lists
+- remove overlapped keys that exist in parsed `tags.assign` if key name also exists in `tags.create`
+- adjust golang binary inside docker container to have same version as when built outside the container
+
+### Docs
+- add install instructions for using docker container
+
+### Feature
+- add ability to reconcile linked service repository display name
+- add ability to assign repositories to services
+- add kubernetes deploy instructions that link to the helm chart
+
+
+## [v0.3.0.beta1] - 2021-05-29
+### Bugfix
+- support all auth methods for kubeconfig by importing the auth package
+- load kubeconfig using client-go ConfigLoadingRules to support multi file KUBECONFIG settings
+
+### Docs
+- remove 'include_prereleases' from the release badge
+- fix badge link to go.mod
+- add a reminder to install the tool first in the quickstart section
+- rework the readme to have a better flow for new users
+
+### Feature
+- support tags that are updated and tags that are append only
+- Provide a way to exclude a namespace(s) via the selector
+- add publishing of docker image to AWS public OpsLevel ECR
+- support printing out comments as part of the config sample command to help explain aspects about the configuration file
+- support a version field in the configuration file to allow for making backwards incompatible changes
+- improve the `service import` output to include an indentation character for better readability
+- improve the output that surrounds the `service preview` data to better instruct the user what to do next
+
+### Refactor
+- switch final docker image to use ubuntu instead of golang
+- k8sutils resource type handler functions use []byte to reduce code duplication
+- cleanup folder structure to improve docker build caching
+- change version command to just print out the version rather then using a log statement
+
+
+## [v0.2.0] - 2021-05-22
+### Bugfix
+- flag `—api-token` did not work but the environment variable did
+
+### Chore
+- upgrade to opslevel-go 0.2.0
+- add badges to readme
+- set MIT license
+
+### Docs
+- added "beta" status callout in readme
+- add terminalizer demo file and gif
+- add quick description to beginning of readme after badges
+
+### Feature
+- add ability to list aliases for tool categories `account tools`
+- add a more simple sample configuration using the command with an additional flag `config sample —simple`
+- enrich output during client validation when 401 unauthorized
+
+### Refactor
+- move opslevel client creation to a common function to always validate for an API key
+- move HasTool check to opslevel-go and validate existance with environment not url to allow for updating the url of a tool
+
+
+## [v0.1.3] - 2021-05-16
+### Chore
+- update opslevel-go to 0.1.3
+
+### Docs
+- add quickstart to readme
+- remove docker install instructions from the readme
+
+### Feature
+- validate jq is installed and on the path - if not log a message
+- add a log statement when finished importing data for a given service
+- skip over aliases and tags that already exist on the service
+- Simple reconcile of existing service entries
+- set a more opinionated aliases configuration with a default
+
+### Refactor
+- bump the log statement for skipping a tool down to debug level
+- find services via the aliases list rather then using name
+- improve error output when unable to cache tiers, lifecycle, teams
+- change default log format to be more human readable
+- Improve service import log output to explain what steps were success or failed ([#6](https://github.com/OpsLevel/kubectl-opslevel/issues/6))
+- extract opslevel api client library to opslevel-go ([#8](https://github.com/OpsLevel/kubectl-opslevel/issues/8))
+
+
+## [v0.1.2] - 2021-05-08
+### Chore
+- Init Changelog
+
+### Docs
+- Update readme TOC
+- Write a more robust readme to help with getting started
+
+### Feature
+- Support attaching Lifecycle, Tier and Owner on newly created service entries
+- Implement listing Team aliases available in your account
+- Implement listing Tier aliases available in your account
+- Implement listing Lifecycle aliases available in your account
+- Implement Account command for viewing data about your OpsLevel account
+- Support creating tags on newly created service entries
+- Support creating tools on newly created service entries
+
+
+## [v0.1.1] - 2021-04-22
+
+## [v0.1.0] - 2021-04-22
+
+## v0.0.1 - 2021-03-25
+
+[v0.6.0]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.5.1...v0.6.0
+[v0.5.1]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.5.0...v0.5.1
+[v0.5.0]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.9...v0.5.0
+[v0.4.9]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.8...v0.4.9
+[v0.4.8]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.7...v0.4.8
+[v0.4.7]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.6...v0.4.7
+[v0.4.6]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.5...v0.4.6
+[v0.4.5]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.5-rc.1...v0.4.5
+[v0.4.5-rc.1]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.4...v0.4.5-rc.1
+[v0.4.4]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.3...v0.4.4
+[v0.4.3]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.2...v0.4.3
+[v0.4.2]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.1...v0.4.2
+[v0.4.1]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.4.0...v0.4.1
+[v0.4.0]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.3.1-beta.1...v0.4.0
+[v0.3.1-beta.1]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.3.0.beta1...v0.3.1-beta.1
+[v0.3.0.beta1]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.2.0...v0.3.0.beta1
+[v0.2.0]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.1.3...v0.2.0
+[v0.1.3]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.1.2...v0.1.3
+[v0.1.2]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.1.1...v0.1.2
+[v0.1.1]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.1.0...v0.1.1
+[v0.1.0]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.0.1...v0.1.0
\ No newline at end of file
diff --git a/changes/v0.6.1.md b/changes/v0.6.1.md
new file mode 100644
index 00000000..b664b110
--- /dev/null
+++ b/changes/v0.6.1.md
@@ -0,0 +1,5 @@
+## [v0.6.1] - 2021-10-26
+### Bugfix
+* skipover duplicate keys in tags.assign when merging service data due to overlapping aliases
+
+[v0.6.1]: https://github.com/OpsLevel/kubectl-opslevel/compare/v0.6.0...v0.6.1
\ No newline at end of file