You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor project from k8s-aws-ebs-tagger to k8s-pvc-tagger (mtougeron#56)
* Start the rename to k8s-pvc-tagger
* Support new & legacy metric names
* track the storageclass in the metrics
* Update default annotation name
* conditionals to support legacy annotations
* update unit tests
* add a note about the rename
* Clarify the aws-ebs only for legacy annotation support
* only publish to new registry names
* Fix helm chart version since it's been renamed not updated
* dockle bugfix
Copy file name to clipboardexpand all lines: README.md
+21-17
Original file line number
Diff line number
Diff line change
@@ -1,36 +1,40 @@
1
-
# k8s-aws-ebs-tagger
1
+
# k8s-pvc-tagger
2
2
3
-
A utility to tag AWS EBS volumes based on the PVC's `aws-ebs-tagger/tags` annotation
3
+
NOTE: This project was originally named `k8s-aws-ebs-tagger` but was renamed to `k8s-pvc-tagger` as the scope has expanded to more than aws ebs volumes.
A utility to tag PVC volumes based on the PVC's `k8s-pvc-tagger/tags` annotation
6
6
7
-
The `k8s-aws-ebs-tagger` watches for new PersistentVolumeClaims and when new AWS EBS volumes are created it adds tags based on the PVC's `aws-ebs-tagger/tags` annotation to the created EBS volume.
The `k8s-pvc-tagger` watches for new PersistentVolumeClaims and when new AWS EBS volumes are created it adds tags based on the PVC's `k8s-pvc-tagger/tags` annotation to the created EBS volume. Other cloud provider and volume times are coming soon.
8
10
9
11
### How to set tags
10
12
11
13
#### cmdline args
12
14
13
-
`--default-tags` - A json or csv encoded key/value map of the tags to set by default on EBS Volumes. Values can be overwritten by the `aws-ebs-tagger/tags` annotation.
15
+
`--default-tags` - A json or csv encoded key/value map of the tags to set by default on EBS Volumes. Values can be overwritten by the `k8s-pvc-tagger/tags` annotation.
14
16
15
-
`--tag-format` - Either `json` or `csv` for the format the `aws-ebs-tagger/tags` and `--default-tags` are in.
17
+
`--tag-format` - Either `json` or `csv` for the format the `k8s-pvc-tagger/tags` and `--default-tags` are in.
16
18
17
19
`--allow-all-tags` - Allow all tags to be set via the PVC; even those used by the EBS controllers. Use with caution!
18
20
19
21
#### Annotations
20
22
21
-
`aws-ebs-tagger/ignore` - When this annotation is set (any value) it will ignore this PVC and not add any tags to it
23
+
`k8s-pvc-tagger/ignore` - When this annotation is set (any value) it will ignore this PVC and not add any tags to it
24
+
25
+
`k8s-pvc-tagger/tags` - A json encoded key/value map of the tags to set on the EBS Volume (in addition to the `--default-tags`). It can also be used to override the values set in the `--default-tags`
22
26
23
-
`aws-ebs-tagger/tags` - A json encoded key/value map of the tags to set on the EBS Volume (in addition to the `--default-tags`). It can also be used to override the values set in the `--default-tags`
27
+
NOTE: Until version `v1.1.0`the legacy annotation prefix of `aws-ebs-tagger` will continue to be supported for aws-ebs volumes ONLY.
24
28
25
29
#### Examples
26
30
27
31
1. The cmdline arg `--default-tags={"me": "touge"}` and no annotation will set the tag `me=touge`
28
32
29
-
2. The cmdline arg `--default-tags={"me": "touge"}` and the annotation `aws-ebs-tagger/tags: | {"me": "someone else", "another tag": "some value"}` will create the tags `me=someone else` and `another tag=some value` on the EBS Volume
33
+
2. The cmdline arg `--default-tags={"me": "touge"}` and the annotation `k8s-pvc-tagger/tags: | {"me": "someone else", "another tag": "some value"}` will create the tags `me=someone else` and `another tag=some value` on the EBS Volume
30
34
31
-
3. The cmdline arg `--default-tags={"me": "touge"}` and the annotation `aws-ebs-tagger/ignore: ""` will not set any tags on the EBS Volume
35
+
3. The cmdline arg `--default-tags={"me": "touge"}` and the annotation `k8s-pvc-tagger/ignore: ""` will not set any tags on the EBS Volume
32
36
33
-
4. The cmdline arg `--default-tags={"me": "touge"}` and the annotation `aws-ebs-tagger/tags: | {"cost-center": "abc", "environment": "prod"}` will create the tags `me=touge`, `cost-center=abc` and `environment=prod` on the EBS Volume
37
+
4. The cmdline arg `--default-tags={"me": "touge"}` and the annotation `k8s-pvc-tagger/tags: | {"cost-center": "abc", "environment": "prod"}` will create the tags `me=touge`, `cost-center=abc` and `environment=prod` on the EBS Volume
You need to create an AWS IAM Role that can be used by `k8s-aws-ebs-tagger`. I recommend using a tool like [kube2iam](https://github.com/jtblin/kube2iam) instead of using an AWS access key/secret. An example policy is in [examples/iam-role.json](examples/iam-role.json).
79
+
You need to create an AWS IAM Role that can be used by `k8s-pvc-tagger`. I recommend using a tool like [kube2iam](https://github.com/jtblin/kube2iam) instead of using an AWS access key/secret. An example policy is in [examples/iam-role.json](examples/iam-role.json).
Images are available on the [GitHub Container Registry](https://github.com/users/mtougeron/packages/container/k8s-aws-ebs-tagger/versions) and [DockerHub](https://hub.docker.com/r/mtougeron/k8s-aws-ebs-tagger). Containers are published for `linux/amd64` & `linux/arm64`.
91
+
Images are available on the [GitHub Container Registry](https://github.com/users/mtougeron/packages/container/k8s-pvc-tagger/versions) and [DockerHub](https://hub.docker.com/r/mtougeron/k8s-pvc-tagger). Containers are published for `linux/amd64` & `linux/arm64`.
88
92
89
93
90
94
### Licensing
91
95
92
-
This project is licensed under the Apache V2 License. See [LICENSE](https://github.com/mtougeron/k8s-aws-ebs-tagger/blob/main/LICENSE) for more information.
96
+
This project is licensed under the Apache V2 License. See [LICENSE](https://github.com/mtougeron/k8s-pvc-tagger/blob/main/LICENSE) for more information.
Security scanning uses [gosec](https://github.com/securego/gosec) via a [GitHub workflow](https://github.com/mtougeron/k8s-aws-ebs-tagger/actions?query=workflow%3AGosec)
11
+
Security scanning uses [gosec](https://github.com/securego/gosec) via a [GitHub workflow](https://github.com/mtougeron/k8s-pvc-tagger/actions?query=workflow%3AGosec)
0 commit comments