mirror of
https://github.com/zalando-incubator/kube-metrics-adapter.git
synced 2025-05-14 09:19:26 +00:00
Compare commits
127 Commits
automate/r
...
gh-pages
Author | SHA1 | Date | |
---|---|---|---|
f62281cdaa | |||
09df04b171 | |||
1eebffcef1 | |||
33bcea69f3 | |||
706c258e9a | |||
4b5b96084b | |||
18f4c82f07 | |||
10dc42b9e9 | |||
20db592a62 | |||
d0a3ea1934 | |||
837e7b9c5d | |||
9d8359b580 | |||
71a8e99d1f | |||
4d4c70c553 | |||
2ccd6903d9 | |||
f58db31f98 | |||
0bf8f5dd0f | |||
e600557636 | |||
0f06db7cdf | |||
1c9038b2cc | |||
fd4ead837e | |||
f46f801811 | |||
4acdf72ef7 | |||
e04cd10bfc | |||
8fe330941a | |||
0730c6ef1e | |||
c5411c74b7 | |||
4ba6b66441 | |||
0dbe769e1b | |||
582a78d4ec | |||
481df883e5 | |||
318d47e05e | |||
190f0db092 | |||
c618494177 | |||
a08860d06c | |||
6b0afe5180 | |||
9722e38f62 | |||
35aa03c771 | |||
34c833e04a | |||
c93c1dd7bb | |||
59d39bc51c | |||
4066e450e5 | |||
8415373f3d | |||
d1969a3020 | |||
582c94255f | |||
c626f414db | |||
1d4beab7a4 | |||
eefd5ef512 | |||
599b3bf805 | |||
ecf21df9c0 | |||
ecd296e644 | |||
446b7f01ea | |||
0ad7296d56 | |||
9da155554b | |||
d7f9664d52 | |||
85f6dda229 | |||
64a6b85c73 | |||
f41af0d82b | |||
194bede7a3 | |||
c4f5efb6a7 | |||
51e9378ee6 | |||
ce27ef1798 | |||
a73ef467cd | |||
e6a04531fb | |||
7289e6f8e2 | |||
60b1dc097a | |||
6b46cc2599 | |||
6f9aba8db8 | |||
a382dbfe7b | |||
7a68304389 | |||
7044e79b08 | |||
e16bacb24e | |||
726c1e691d | |||
debc90ca72 | |||
6343c8ea15 | |||
eb0575f11e | |||
52bfbbb1b0 | |||
cf5872ef08 | |||
b5432fb1f3 | |||
5466badd90 | |||
aef1837e47 | |||
4e86d6ae34 | |||
2874c1a6a7 | |||
b5006746f0 | |||
9496ab7fd3 | |||
aa7f86291e | |||
486a6c4262 | |||
aaf66f31a0 | |||
e5bee93bf6 | |||
aae3772472 | |||
76d3726e5b | |||
ea4a651afe | |||
721c6553d8 | |||
5aa2272e37 | |||
b9300d1e46 | |||
5747b6c9de | |||
6d15a1635a | |||
4090ab8b32 | |||
1f56abf931 | |||
f216070630 | |||
8725f02db7 | |||
240452ca27 | |||
45d7863e73 | |||
87f249d36b | |||
9967a55df8 | |||
adf0792079 | |||
99fa5c42ed | |||
188cc91574 | |||
a8ff0ed6f0 | |||
cc9279b283 | |||
9bb7d976a0 | |||
816661f7fd | |||
7ae70d798d | |||
0ef5ad1cfe | |||
c86235636b | |||
2d119e68e4 | |||
df3efe0e39 | |||
a5b5cb91c3 | |||
ebcf99ad27 | |||
3d450ad2c2 | |||
78a9b5c253 | |||
4e2b9d9788 | |||
38aeb4deed | |||
b7aa886546 | |||
942e753f87 | |||
86ed6ec102 | |||
b313c963b6 |
17
.github/ISSUE_TEMPLATE.md
vendored
17
.github/ISSUE_TEMPLATE.md
vendored
@ -1,17 +0,0 @@
|
|||||||
## Expected Behavior
|
|
||||||
|
|
||||||
|
|
||||||
## Actual Behavior
|
|
||||||
|
|
||||||
|
|
||||||
## Steps to Reproduce the Problem
|
|
||||||
|
|
||||||
1.
|
|
||||||
1.
|
|
||||||
1.
|
|
||||||
|
|
||||||
## Specifications
|
|
||||||
|
|
||||||
- Version:
|
|
||||||
- Platform:
|
|
||||||
- Subsystem:
|
|
31
.github/PULL_REQUEST_TEMPLATE.md
vendored
31
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,31 +0,0 @@
|
|||||||
# One-line summary
|
|
||||||
|
|
||||||
> Issue : #1234 (only if appropriate)
|
|
||||||
|
|
||||||
## Description
|
|
||||||
A few sentences describing the overall goals of the pull request's
|
|
||||||
commits.
|
|
||||||
|
|
||||||
## Types of Changes
|
|
||||||
_What types of changes does your code introduce? Keep the ones that apply:_
|
|
||||||
|
|
||||||
- New feature (non-breaking change which adds functionality)
|
|
||||||
- Bug fix (non-breaking change which fixes an issue)
|
|
||||||
- Configuration change
|
|
||||||
- Refactor/improvements
|
|
||||||
- Documentation / non-code
|
|
||||||
|
|
||||||
## Tasks
|
|
||||||
_List of tasks you will do to complete the PR_
|
|
||||||
- [ ] Created Task 1
|
|
||||||
- [ ] Created Task 2
|
|
||||||
- [ ] To-do Task 3
|
|
||||||
|
|
||||||
## Review
|
|
||||||
_List of tasks the reviewer must do to review the PR_
|
|
||||||
- [ ] Tests
|
|
||||||
- [ ] Documentation
|
|
||||||
- [ ] CHANGELOG
|
|
||||||
|
|
||||||
## Deployment Notes
|
|
||||||
These should highlight any db migrations, feature toggles, etc.
|
|
14
.github/dependabot.yml
vendored
14
.github/dependabot.yml
vendored
@ -1,14 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: gomod
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: monthly
|
|
||||||
time: "07:00"
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
- package-ecosystem: docker
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: monthly
|
|
||||||
time: "07:00"
|
|
||||||
open-pull-requests-limit: 10
|
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
build/
|
|
||||||
apiserver.local.config/
|
|
||||||
.idea/
|
|
||||||
vendor/
|
|
@ -1,19 +0,0 @@
|
|||||||
run:
|
|
||||||
linters-settings:
|
|
||||||
golint:
|
|
||||||
min-confidence: 0.9
|
|
||||||
|
|
||||||
linters:
|
|
||||||
disable-all: true
|
|
||||||
enable:
|
|
||||||
- staticcheck
|
|
||||||
- ineffassign
|
|
||||||
- golint
|
|
||||||
- goimports
|
|
||||||
- errcheck
|
|
||||||
issues:
|
|
||||||
exclude-rules:
|
|
||||||
# Exclude some staticcheck messages
|
|
||||||
- linters:
|
|
||||||
- staticcheck
|
|
||||||
text: "SA9003:"
|
|
20
.travis.yml
20
.travis.yml
@ -1,20 +0,0 @@
|
|||||||
language: go
|
|
||||||
dist: xenial
|
|
||||||
|
|
||||||
go:
|
|
||||||
- "1.14.x"
|
|
||||||
|
|
||||||
env:
|
|
||||||
- GO111MODULE=on GOLANGCI_RELEASE="v1.21.0"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- GO111MODULE=off go get github.com/mattn/goveralls
|
|
||||||
- GO111MODULE=off go get github.com/lawrencewoodman/roveralls
|
|
||||||
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_RELEASE}
|
|
||||||
|
|
||||||
script:
|
|
||||||
- make test
|
|
||||||
- make build.docker
|
|
||||||
- make check
|
|
||||||
- roveralls
|
|
||||||
- goveralls -v -coverprofile=roveralls.coverprofile -service=travis-ci
|
|
@ -1,9 +0,0 @@
|
|||||||
# for github.com
|
|
||||||
approvals:
|
|
||||||
groups:
|
|
||||||
zalando:
|
|
||||||
minimum: 2
|
|
||||||
from:
|
|
||||||
orgs:
|
|
||||||
- "zalando"
|
|
||||||
X-Zalando-Team: teapot
|
|
@ -1,74 +0,0 @@
|
|||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
In the interest of fostering an open and welcoming environment, we as
|
|
||||||
contributors and maintainers pledge to making participation in our project and
|
|
||||||
our community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
||||||
nationality, personal appearance, race, religion, or sexual identity and
|
|
||||||
orientation.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment
|
|
||||||
include:
|
|
||||||
|
|
||||||
* Using welcoming and inclusive language
|
|
||||||
* Being respectful of differing viewpoints and experiences
|
|
||||||
* Gracefully accepting constructive criticism
|
|
||||||
* Focusing on what is best for the community
|
|
||||||
* Showing empathy towards other community members
|
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
|
||||||
|
|
||||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
||||||
advances
|
|
||||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
||||||
* Public or private harassment
|
|
||||||
* Publishing others' private information, such as a physical or electronic
|
|
||||||
address, without explicit permission
|
|
||||||
* Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Our Responsibilities
|
|
||||||
|
|
||||||
Project maintainers are responsible for clarifying the standards of acceptable
|
|
||||||
behavior and are expected to take appropriate and fair corrective action in
|
|
||||||
response to any instances of unacceptable behavior.
|
|
||||||
|
|
||||||
Project maintainers have the right and responsibility to remove, edit, or
|
|
||||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
||||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
||||||
permanently any contributor for other behaviors that they deem inappropriate,
|
|
||||||
threatening, offensive, or harmful.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies both within project spaces and in public spaces
|
|
||||||
when an individual is representing the project or its community. Examples of
|
|
||||||
representing a project or community include using an official project e-mail
|
|
||||||
address, posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event. Representation of a project may be
|
|
||||||
further defined and clarified by project maintainers.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported by contacting the project team see [MAINTAINERS.md](MAINTAINERS.md). All
|
|
||||||
complaints will be reviewed and investigated and will result in a response that
|
|
||||||
is deemed necessary and appropriate to the circumstances. The project team is
|
|
||||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
||||||
Further details of specific enforcement policies may be posted separately.
|
|
||||||
|
|
||||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
||||||
faith may face temporary or permanent repercussions as determined by other
|
|
||||||
members of the project's leadership.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
||||||
available at [http://contributor-covenant.org/version/1/4][version]
|
|
||||||
|
|
||||||
[homepage]: http://contributor-covenant.org
|
|
||||||
[version]: http://contributor-covenant.org/version/1/4/
|
|
@ -1,86 +0,0 @@
|
|||||||
# Contributing
|
|
||||||
|
|
||||||
**Thank you for your interest in making the project better and more useful.
|
|
||||||
Your contributions are highly welcome.**
|
|
||||||
|
|
||||||
There are multiple ways of getting involved:
|
|
||||||
|
|
||||||
- [Report a bug](#report-a-bug)
|
|
||||||
- [Suggest a feature](#suggest-a-feature)
|
|
||||||
- [Contribute code](#contribute-code)
|
|
||||||
|
|
||||||
Below are a few guidelines we would like you to follow.
|
|
||||||
If you need help, please reach out to us by opening an issue.
|
|
||||||
|
|
||||||
## Report a bug
|
|
||||||
|
|
||||||
Reporting bugs is one of the best ways to contribute. Before creating a bug
|
|
||||||
report, please check that an [issue](/issues) reporting the same problem does
|
|
||||||
not already exist. If there is such an issue, you may add your information as a
|
|
||||||
comment.
|
|
||||||
|
|
||||||
To report a new bug you should open an issue that summarizes the bug and set
|
|
||||||
the label to "bug".
|
|
||||||
|
|
||||||
If you want to provide a fix along with your bug report: That is great! In this
|
|
||||||
case please send us a pull request as described in section [Contribute
|
|
||||||
Code](#contribute-code).
|
|
||||||
|
|
||||||
## Suggest a feature
|
|
||||||
|
|
||||||
To request a new feature you should open an [issue](../../issues/new) and
|
|
||||||
summarize the desired functionality and its use case. Set the issue label to
|
|
||||||
"feature".
|
|
||||||
|
|
||||||
## Contribute code
|
|
||||||
|
|
||||||
This is an outline of what the workflow for code contributions looks like
|
|
||||||
|
|
||||||
- Check the list of open [issues](../../issues). Either assign an existing
|
|
||||||
issue to yourself, or create a new one that you would like work on and
|
|
||||||
discuss your ideas and use cases.
|
|
||||||
|
|
||||||
It is always best to discuss your plans beforehand, to ensure that your
|
|
||||||
contribution is in line with our goals.
|
|
||||||
|
|
||||||
- Fork the repository on GitHub
|
|
||||||
- Create a topic branch from where you want to base your work. This is usually master.
|
|
||||||
- Open a new pull request, label it `work in progress` and outline what you will be contributing
|
|
||||||
- Make commits of logical units.
|
|
||||||
- Make sure you sign-off on your commits `git commit -s -m "adding X to change Y"`
|
|
||||||
- Write good commit messages (see below).
|
|
||||||
- Push your changes to a topic branch in your fork of the repository.
|
|
||||||
- As you push your changes, update the pull request with new infomation and tasks as you complete them
|
|
||||||
- Project maintainers might comment on your work as you progress
|
|
||||||
- When you are done, remove the `work in progess` label and ping the maintainers for a review
|
|
||||||
- Your pull request must receive a :thumbsup: from two [maintainers](MAINTAINERS)
|
|
||||||
|
|
||||||
Thanks for your contributions!
|
|
||||||
|
|
||||||
### Commit messages
|
|
||||||
|
|
||||||
Your commit messages ideally can answer two questions: what changed and why.
|
|
||||||
The subject line should feature the “what” and the body of the commit should
|
|
||||||
describe the “why”.
|
|
||||||
|
|
||||||
When creating a pull request, its description should reference the corresponding issue id.
|
|
||||||
|
|
||||||
### Sign your work / Developer certificate of origin
|
|
||||||
All contributions (including pull requests) must agree to the Developer
|
|
||||||
Certificate of Origin (DCO) version 1.1. This is exactly the same one created
|
|
||||||
and used by the Linux kernel developers and posted on
|
|
||||||
http://developercertificate.org/. This is a developer's certification that he
|
|
||||||
or she has the right to submit the patch for inclusion into the project. Simply
|
|
||||||
submitting a contribution implies this agreement, however, please include a
|
|
||||||
"Signed-off-by" tag in every patch (this tag is a conventional way to confirm
|
|
||||||
that you agree to the DCO) - you can automate this with a [Git
|
|
||||||
hook](https://stackoverflow.com/questions/15015894/git-add-signed-off-by-line-using-format-signoff-not-working)
|
|
||||||
|
|
||||||
```
|
|
||||||
git commit -s -m "adding X to change Y"
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**Have fun, and happy hacking!**
|
|
@ -1,6 +0,0 @@
|
|||||||
# Project Contributors
|
|
||||||
|
|
||||||
All external contributors to the project, we are grateful for all their help
|
|
||||||
|
|
||||||
## Contributors sorted alphabetically
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
FROM registry.opensource.zalan.do/library/alpine-3.12:latest
|
|
||||||
LABEL maintainer="Team Teapot @ Zalando SE <team-teapot@zalando.de>"
|
|
||||||
|
|
||||||
# add binary
|
|
||||||
ADD build/linux/kube-metrics-adapter /
|
|
||||||
|
|
||||||
ENTRYPOINT ["/kube-metrics-adapter"]
|
|
21
LICENSE
21
LICENSE
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2018 Zalando SE
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
@ -1,2 +0,0 @@
|
|||||||
Mikkel Larsen <mikkel.larsen@zalando.de>
|
|
||||||
Team Teapot <team-teapot@zalando.de>
|
|
56
Makefile
56
Makefile
@ -1,56 +0,0 @@
|
|||||||
.PHONY: clean test check build.local build.linux build.osx build.docker build.push
|
|
||||||
|
|
||||||
BINARY ?= kube-metrics-adapter
|
|
||||||
VERSION ?= $(shell git describe --tags --always --dirty)
|
|
||||||
IMAGE ?= registry-write.opensource.zalan.do/teapot/$(BINARY)
|
|
||||||
TAG ?= $(VERSION)
|
|
||||||
SOURCES = $(shell find . -name '*.go')
|
|
||||||
DOCKERFILE ?= Dockerfile
|
|
||||||
GOPKGS = $(shell go list ./...)
|
|
||||||
BUILD_FLAGS ?= -v
|
|
||||||
OPENAPI ?= pkg/api/generated/openapi/zz_generated.openapi.go
|
|
||||||
LDFLAGS ?= -X main.version=$(VERSION) -w -s
|
|
||||||
|
|
||||||
|
|
||||||
default: build.local
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf build
|
|
||||||
rm -rf $(OPENAPI)
|
|
||||||
|
|
||||||
test:
|
|
||||||
go test -v $(GOPKGS)
|
|
||||||
|
|
||||||
check:
|
|
||||||
go mod download
|
|
||||||
golangci-lint run --timeout=2m ./...
|
|
||||||
|
|
||||||
|
|
||||||
$(OPENAPI): go.mod
|
|
||||||
go run k8s.io/kube-openapi/cmd/openapi-gen \
|
|
||||||
--go-header-file hack/boilerplate.go.txt \
|
|
||||||
--logtostderr \
|
|
||||||
-i k8s.io/metrics/pkg/apis/custom_metrics,k8s.io/metrics/pkg/apis/custom_metrics/v1beta1,k8s.io/metrics/pkg/apis/custom_metrics/v1beta2,k8s.io/metrics/pkg/apis/external_metrics,k8s.io/metrics/pkg/apis/external_metrics/v1beta1,k8s.io/metrics/pkg/apis/metrics,k8s.io/metrics/pkg/apis/metrics/v1beta1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/version,k8s.io/api/core/v1 \
|
|
||||||
-p pkg/api/generated/openapi \
|
|
||||||
-o . \
|
|
||||||
-O zz_generated.openapi \
|
|
||||||
-r /dev/null
|
|
||||||
|
|
||||||
build.local: build/$(BINARY)
|
|
||||||
build.linux: build/linux/$(BINARY)
|
|
||||||
build.osx: build/osx/$(BINARY)
|
|
||||||
|
|
||||||
build/$(BINARY): go.mod $(SOURCES) $(OPENAPI)
|
|
||||||
CGO_ENABLED=0 go build -o build/$(BINARY) $(BUILD_FLAGS) -ldflags "$(LDFLAGS)" .
|
|
||||||
|
|
||||||
build/linux/$(BINARY): go.mod $(SOURCES) $(OPENAPI)
|
|
||||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build $(BUILD_FLAGS) -o build/linux/$(BINARY) -ldflags "$(LDFLAGS)" .
|
|
||||||
|
|
||||||
build/osx/$(BINARY): go.mod $(SOURCES) $(OPENAPI)
|
|
||||||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build $(BUILD_FLAGS) -o build/osx/$(BINARY) -ldflags "$(LDFLAGS)" .
|
|
||||||
|
|
||||||
build.docker: build.linux
|
|
||||||
docker build --rm -t "$(IMAGE):$(TAG)" -f $(DOCKERFILE) .
|
|
||||||
|
|
||||||
build.push: build.docker
|
|
||||||
docker push "$(IMAGE):$(TAG)"
|
|
@ -1,8 +0,0 @@
|
|||||||
We acknowledge that every line of code that we write may potentially contain security issues.
|
|
||||||
We are trying to deal with it responsibly and provide patches as quickly as possible.
|
|
||||||
|
|
||||||
We host our bug bounty program on HackerOne, it is currently private, therefore if you would like to report a vulnerability and get rewarded for it, please ask to join our program by filling this form:
|
|
||||||
|
|
||||||
https://corporate.zalando.com/en/services-and-contact#security-form
|
|
||||||
|
|
||||||
You can also send you report via this form if you do not want to join our bug bounty program and just want to report a vulnerability or security issue.
|
|
@ -1,53 +0,0 @@
|
|||||||
version: "2017-09-20"
|
|
||||||
pipeline:
|
|
||||||
- id: build
|
|
||||||
overlay: ci/golang
|
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- /go/pkg/mod # pkg cache for Go modules
|
|
||||||
- ~/.cache/go-build # Go build cache
|
|
||||||
type: script
|
|
||||||
env:
|
|
||||||
GOFLAGS: "-mod=readonly"
|
|
||||||
commands:
|
|
||||||
- desc: test
|
|
||||||
cmd: |
|
|
||||||
make test
|
|
||||||
- desc: build
|
|
||||||
cmd: |
|
|
||||||
make build.docker
|
|
||||||
- desc: push
|
|
||||||
cmd: |
|
|
||||||
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
|
|
||||||
IMAGE=registry-write.opensource.zalan.do/teapot/kube-metrics-adapter
|
|
||||||
LATEST_VERSION=$(git describe --tags --always | awk -F \- '{print $1}')
|
|
||||||
CUR_PART=$(echo $LATEST_VERSION | awk -F . '{print $1"."$2}')
|
|
||||||
VERSION_PART=$(cat VERSION)
|
|
||||||
OLD_PATCH=$(echo $LATEST_VERSION | awk -F . '{print $3}')
|
|
||||||
NEW_PATCH=$((OLD_PATCH + 1))
|
|
||||||
if [ "$CUR_PART" != "$VERSION_PART" ]; then NEW_PATCH=0; fi
|
|
||||||
VERSION=${VERSION_PART}.${NEW_PATCH}
|
|
||||||
echo "Creating release for tag: ${VERSION}"
|
|
||||||
|
|
||||||
else
|
|
||||||
IMAGE=registry-write.opensource.zalan.do/teapot/kube-metrics-adapter-test
|
|
||||||
VERSION=$CDP_BUILD_VERSION
|
|
||||||
fi
|
|
||||||
IMAGE=$IMAGE VERSION=$VERSION make build.docker
|
|
||||||
git diff --stat --exit-code
|
|
||||||
IMAGE=$IMAGE VERSION=$VERSION make build.push
|
|
||||||
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
|
|
||||||
echo "create release page"
|
|
||||||
tf=$(mktemp)
|
|
||||||
echo -e "### Changes\n" >$tf
|
|
||||||
git log -1 --pretty=%B | grep -v 'Signed-off-by:' | grep -v -E '^\s*$' | grep -vE '^\*' >>$tf
|
|
||||||
echo -e "\n### Docker image\n" >>$tf
|
|
||||||
echo -e "Docker image is available in Zalando's Open Source registry:\n" >>$tf
|
|
||||||
echo -e '```' >>$tf
|
|
||||||
echo -e "docker run -it registry.opensource.zalan.do/teapot/kube-metrics-adapter:${VERSION} --help" >>$tf
|
|
||||||
echo -e '```' >>$tf
|
|
||||||
echo "################################"
|
|
||||||
cat $tf
|
|
||||||
echo "################################"
|
|
||||||
git gh-release --message-from-file "${tf}" $VERSION
|
|
||||||
fi
|
|
@ -1,13 +0,0 @@
|
|||||||
apiVersion: apiregistration.k8s.io/v1beta1
|
|
||||||
kind: APIService
|
|
||||||
metadata:
|
|
||||||
name: v1beta1.custom.metrics.k8s.io
|
|
||||||
spec:
|
|
||||||
service:
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: kube-system
|
|
||||||
group: custom.metrics.k8s.io
|
|
||||||
version: v1beta1
|
|
||||||
insecureSkipTLSVerify: true
|
|
||||||
groupPriorityMinimum: 100
|
|
||||||
versionPriority: 100
|
|
@ -1,40 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: kube-system
|
|
||||||
labels:
|
|
||||||
application: kube-metrics-adapter
|
|
||||||
version: latest
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
application: kube-metrics-adapter
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
application: kube-metrics-adapter
|
|
||||||
version: latest
|
|
||||||
annotations:
|
|
||||||
iam.amazonaws.com/role: "kube-aws-test-1-app-zmon"
|
|
||||||
spec:
|
|
||||||
serviceAccountName: custom-metrics-apiserver
|
|
||||||
containers:
|
|
||||||
- name: kube-metrics-adapter
|
|
||||||
image: registry.opensource.zalan.do/teapot/kube-metrics-adapter:latest
|
|
||||||
args:
|
|
||||||
# - --v=9
|
|
||||||
- --prometheus-server=http://prometheus.kube-system.svc.cluster.local
|
|
||||||
- --skipper-ingress-metrics
|
|
||||||
- --aws-external-metrics
|
|
||||||
env:
|
|
||||||
- name: AWS_REGION
|
|
||||||
value: eu-central-1
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 100Mi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 100Mi
|
|
@ -1,13 +0,0 @@
|
|||||||
apiVersion: apiregistration.k8s.io/v1beta1
|
|
||||||
kind: APIService
|
|
||||||
metadata:
|
|
||||||
name: v1beta1.external.metrics.k8s.io
|
|
||||||
spec:
|
|
||||||
service:
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: kube-system
|
|
||||||
group: external.metrics.k8s.io
|
|
||||||
version: v1beta1
|
|
||||||
insecureSkipTLSVerify: true
|
|
||||||
groupPriorityMinimum: 100
|
|
||||||
versionPriority: 100
|
|
@ -1,9 +0,0 @@
|
|||||||
apiVersion: v2
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
version: 0.1.9
|
|
||||||
description: kube-metrics-adapter helm chart
|
|
||||||
home: https://github.com/zalando-incubator/kube-metrics-adapter
|
|
||||||
maintainers:
|
|
||||||
- name: The Zalando Incubator
|
|
||||||
email: opensource@zalando.de
|
|
||||||
url: https://github.com/zalando-incubator
|
|
@ -1,15 +0,0 @@
|
|||||||
{{- if .Values.enableCustomMetricsApi }}
|
|
||||||
apiVersion: apiregistration.k8s.io/v1beta1
|
|
||||||
kind: APIService
|
|
||||||
metadata:
|
|
||||||
name: v1beta1.custom.metrics.k8s.io
|
|
||||||
spec:
|
|
||||||
service:
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
group: custom.metrics.k8s.io
|
|
||||||
version: v1beta1
|
|
||||||
insecureSkipTLSVerify: {{ .Values.tls.skipTLSVerify }}
|
|
||||||
groupPriorityMinimum: 100
|
|
||||||
versionPriority: 100
|
|
||||||
{{- end}}
|
|
@ -1,191 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
labels:
|
|
||||||
application: kube-metrics-adapter
|
|
||||||
version: {{ .Values.registry.imageTag }}
|
|
||||||
spec:
|
|
||||||
replicas: {{ .Values.replicas }}
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
application: kube-metrics-adapter
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
application: kube-metrics-adapter
|
|
||||||
version: {{ .Values.registry.imageTag }}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: kube-metrics-adapter
|
|
||||||
containers:
|
|
||||||
- name: kube-metrics-adapter
|
|
||||||
image: {{ .Values.registry.image}}:{{ .Values.registry.imageTag }}
|
|
||||||
args:
|
|
||||||
{{- if .Values.addDirectoryHeader }}
|
|
||||||
- --add_dir_header={{ .Values.addDirectoryHeader }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.alsoToStderr }}
|
|
||||||
- --alsologtostderr={{ .Values.log.alsoToStderr }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.authentication.kubeConfig }}
|
|
||||||
- --authentication-kubeconfig={{ .Values.authentication.kubeConfig }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.authentication.skipLookup }}
|
|
||||||
- --authentication-skip-lookup={{ .Values.authentication.skipLookup }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.authentication.tokenWebhookCacheTtl }}
|
|
||||||
- --authentication-token-webhook-cache-ttl={{ .Values.authentication.tokenWebhookCacheTtl }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.authentication.tolerateLookupFailure }}
|
|
||||||
- --authentication-tolerate-lookup-failure={{ .Values.authentication.tolerateLookupFailure }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.authorization.alwaysAllowPaths }}
|
|
||||||
- --authorization-always-allow-paths={{ .Values.authorization.alwaysAllowPaths }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.authorization.kubeConfig }}
|
|
||||||
- --authorization-kubeconfig={{ .Values.authorization.kubeConfig }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.authorization.webhookCache.authorizedTtl }}
|
|
||||||
- --authorization-webhook-cache-authorized-ttl={{ .Values.authorization.webhookCache.authorizedTtl }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.authorization.webhookCache.unauthorizedTtl }}
|
|
||||||
- --authorization-webhook-cache-unauthorized-ttl={{ .Values.authorization.webhookCache.unauthorizedTtl }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.aws.externalMetrics }}
|
|
||||||
- --aws-external-metrics={{ .Values.aws.externalMetrics }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.aws.region }}
|
|
||||||
- --aws-region={{ .Values.aws.region }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.tls.certificateDirectory }}
|
|
||||||
- --cert-dir={{ .Values.tls.certificateDirectory }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.tls.clientCaFile }}
|
|
||||||
- --client-ca-file={{ .Values.tls.clientCaFile }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.contentionProfiling }}
|
|
||||||
- --contention-profiling={{ .Values.contentionProfiling }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.credentialsDirectory }}
|
|
||||||
- --credentials-dir={{ .Values.credentialsDirectory }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.disregardIncompatibleHPAs }}
|
|
||||||
- --disregard-incompatible-hpas={{ .Values.disregardIncompatibleHPAs }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.enableCustomMetricsApi }}
|
|
||||||
- --enable-custom-metrics-api={{ .Values.enableCustomMetricsApi }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.enableExternalMetricsApi }}
|
|
||||||
- --enable-external-metrics-api={{ .Values.enableExternalMetricsApi }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.http2MaxStreamsPerConnection }}
|
|
||||||
- --http2-max-streams-per-connection={{ .Values.http2MaxStreamsPerConnection }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.influxDB.address }}
|
|
||||||
- --influxdb-address={{ .Values.influxDB.address }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.influxDB.organization }}
|
|
||||||
- --influxdb-org={{ .Values.influxDB.organization }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.influxDB.token }}
|
|
||||||
- --influxdb-token={{ .Values.influxDB.token }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.listerKubeConfig }}
|
|
||||||
- --lister-kubeconfig={{ .Values.listerKubeConfig }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.flushFrequency }}
|
|
||||||
- --log-flush-frequency={{ .Values.log.flushFrequency }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.backtraceAtTraceLocation }}
|
|
||||||
- --log_backtrace_at={{ .Values.log.backtraceAtTraceLocation }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.directory }}
|
|
||||||
- --log_dir={{ .Values.log.directory }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.file }}
|
|
||||||
- --log_file={{ .Values.log.file }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.fileMaxSize }}
|
|
||||||
- --log_file_max_size={{ .Values.log.fileMaxSize }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.toStderr }}
|
|
||||||
- --logtostderr={{ .Values.log.toStderr }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.prometheus.metricsAddress }}
|
|
||||||
- --metrics-address={{ .Values.prometheus.metricsAddress }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.profiling }}
|
|
||||||
- --profiling={{ .Values.profiling }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.prometheus.server }}
|
|
||||||
- --prometheus-server={{ .Values.prometheus.server }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.requestHeader.allowedNames }}
|
|
||||||
- --requestheader-allowed-names={{ .Values.requestHeader.allowedNames }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.requestHeader.clientCaFile }}
|
|
||||||
- --requestheader-client-ca-file={{ .Values.requestHeader.clientCaFile }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.requestHeader.extraHeadersPrefix }}
|
|
||||||
- --requestheader-extra-headers-prefix={{ .Values.requestHeader.extraHeadersPrefix }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.requestHeader.groupHeaders }}
|
|
||||||
- --requestheader-group-headers={{ .Values.requestHeader.groupHeaders }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.requestHeader.usernameHeaders }}
|
|
||||||
- --requestheader-username-headers={{ .Values.requestHeader.usernameHeaders }}
|
|
||||||
{{- end}}
|
|
||||||
- --secure-port={{ .Values.service.internalPort }}
|
|
||||||
{{- if .Values.log.skipHeaders }}
|
|
||||||
- --skip_headers={{ .Values.log.skipHeaders }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.skipLogHeaders }}
|
|
||||||
- --skip_log_headers={{ .Values.log.skipLogHeaders }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.skipperBackendsAnnotation }}
|
|
||||||
- --skipper-backends-annotation={{ .Values.skipperBackendsAnnotation }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.skipperIngressMetrics }}
|
|
||||||
- --skipper-ingress-metrics={{ .Values.skipperIngressMetrics }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.stderrThreshold }}
|
|
||||||
- --stderrthreshold={{ .Values.log.stderrThreshold }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.tls.certFile }}
|
|
||||||
- --tls-cert-file={{ .Values.tls.certFile }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.tls.cipherSuites }}
|
|
||||||
- --tls-cipher-suites={{ .Values.tls.cipherSuites }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.tls.minVersion }}
|
|
||||||
- --tls-min-version={{ .Values.tls.minVersion }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.tls.privateKeyFile }}
|
|
||||||
- --tls-private-key-file={{ .Values.tls.privateKeyFile }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.tls.sniCertKey }}
|
|
||||||
- --tls-sni-cert-key={{ .Values.tls.sniCertKey }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.token }}
|
|
||||||
- --token={{ .Values.token }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.log.level }}
|
|
||||||
- --v={{ .Values.log.level }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.vmodule }}
|
|
||||||
- --vmodule={{ .Values.vmodule }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.zmon.kariosdbEndpoint }}
|
|
||||||
- --zmon-kariosdb-endpoint={{ .Values.zmon.kariosdbEndpoint }}
|
|
||||||
{{- end}}
|
|
||||||
{{- if .Values.zmon.tokenName }}
|
|
||||||
- --zmon-token-name={{ .Values.zmon.tokenName }}
|
|
||||||
{{- end}}
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: {{ .Values.resources.limits.cpu }}
|
|
||||||
memory: {{ .Values.resources.limits.memory }}
|
|
||||||
requests:
|
|
||||||
cpu: {{ .Values.resources.requests.cpu }}
|
|
||||||
memory: {{ .Values.resources.requests.memory }}
|
|
@ -1,15 +0,0 @@
|
|||||||
{{- if .Values.enableExternalMetricsApi }}
|
|
||||||
apiVersion: apiregistration.k8s.io/v1beta1
|
|
||||||
kind: APIService
|
|
||||||
metadata:
|
|
||||||
name: v1beta1.external.metrics.k8s.io
|
|
||||||
spec:
|
|
||||||
service:
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
group: external.metrics.k8s.io
|
|
||||||
version: v1beta1
|
|
||||||
insecureSkipTLSVerify: {{ .Values.tls.skipTLSVerify }}
|
|
||||||
groupPriorityMinimum: 100
|
|
||||||
versionPriority: 100
|
|
||||||
{{- end}}
|
|
@ -1,154 +0,0 @@
|
|||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter-server-resources
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- custom.metrics.k8s.io
|
|
||||||
resources: ["*"]
|
|
||||||
verbs: ["*"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: external-metrics-server-resources
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- external.metrics.k8s.io
|
|
||||||
resources: ["*"]
|
|
||||||
verbs: ["*"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter-resource-reader
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- namespaces
|
|
||||||
- pods
|
|
||||||
- services
|
|
||||||
- configmaps
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter-resource-collector
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- events
|
|
||||||
verbs:
|
|
||||||
- create
|
|
||||||
- patch
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- pods
|
|
||||||
verbs:
|
|
||||||
- list
|
|
||||||
- apiGroups:
|
|
||||||
- apps
|
|
||||||
resources:
|
|
||||||
- deployments
|
|
||||||
- statefulsets
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- apiGroups:
|
|
||||||
- extensions
|
|
||||||
resources:
|
|
||||||
- ingresses
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- apiGroups:
|
|
||||||
- autoscaling
|
|
||||||
resources:
|
|
||||||
- horizontalpodautoscalers
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: hpa-controller-custom-metrics
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: kube-metrics-adapter-server-resources
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: horizontal-pod-autoscaler
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: hpa-controller-external-metrics
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: external-metrics-server-resources
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: horizontal-pod-autoscaler
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter-auth-reader
|
|
||||||
namespace: kube-system
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: extension-apiserver-authentication-reader
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: custom-metrics:system:auth-delegator
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: system:auth-delegator
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter-resource-collector
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: kube-metrics-adapter-resource-collector
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter-resource-reader
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: kube-metrics-adapter-resource-reader
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
@ -1,5 +0,0 @@
|
|||||||
kind: ServiceAccount
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
@ -1,11 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: kube-metrics-adapter
|
|
||||||
namespace: {{ .Values.namespace }}
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: {{ .Values.service.port }}
|
|
||||||
targetPort: {{ .Values.service.internalPort }}
|
|
||||||
selector:
|
|
||||||
application: kube-metrics-adapter
|
|
@ -1,94 +0,0 @@
|
|||||||
namespace: kube-system
|
|
||||||
|
|
||||||
replicas: 1
|
|
||||||
|
|
||||||
registry:
|
|
||||||
image: registry.opensource.zalan.do/teapot/kube-metrics-adapter
|
|
||||||
imageTag: v0.1.9
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
|
|
||||||
service:
|
|
||||||
port: 443
|
|
||||||
internalPort: 443
|
|
||||||
|
|
||||||
addDirectoryHeader:
|
|
||||||
contentionProfiling:
|
|
||||||
profiling:
|
|
||||||
enableCustomMetricsApi:
|
|
||||||
enableExternalMetricsApi:
|
|
||||||
credentialsDirectory:
|
|
||||||
disregardIncompatibleHPAs:
|
|
||||||
http2MaxStreamsPerConnection:
|
|
||||||
listerKubeConfig:
|
|
||||||
skipperBackendsAnnotation:
|
|
||||||
skipperIngressMetrics:
|
|
||||||
token:
|
|
||||||
vmodule:
|
|
||||||
|
|
||||||
authentication:
|
|
||||||
kubeConfig:
|
|
||||||
skipLookup:
|
|
||||||
tokenWebhookCacheTtl:
|
|
||||||
tolerateLookupFailure:
|
|
||||||
|
|
||||||
authorization:
|
|
||||||
kubeConfig:
|
|
||||||
alwaysAllowPaths:
|
|
||||||
webhookCache:
|
|
||||||
authorizedTtl:
|
|
||||||
unauthorizedTtl:
|
|
||||||
|
|
||||||
aws:
|
|
||||||
externalMetrics:
|
|
||||||
region:
|
|
||||||
|
|
||||||
influxDB:
|
|
||||||
address:
|
|
||||||
organization:
|
|
||||||
token:
|
|
||||||
|
|
||||||
log:
|
|
||||||
alsoToStderr:
|
|
||||||
toStderr:
|
|
||||||
flushFrequency:
|
|
||||||
backtraceAtTraceLocation:
|
|
||||||
directory:
|
|
||||||
file:
|
|
||||||
fileMaxSize:
|
|
||||||
level:
|
|
||||||
stderrThreshold:
|
|
||||||
skipHeaders:
|
|
||||||
skipLogHeaders:
|
|
||||||
|
|
||||||
prometheus:
|
|
||||||
server: http://prometheus.kube-system.svc.cluster.local
|
|
||||||
metricsAddress:
|
|
||||||
|
|
||||||
requestHeader:
|
|
||||||
allowedNames:
|
|
||||||
clientCaFile:
|
|
||||||
extraHeadersPrefix:
|
|
||||||
groupHeaders:
|
|
||||||
usernameHeaders:
|
|
||||||
|
|
||||||
tls:
|
|
||||||
skipTLSVerify: true
|
|
||||||
certificateDirectory:
|
|
||||||
clientCaFile:
|
|
||||||
certFile:
|
|
||||||
cipherSuites:
|
|
||||||
minVersion:
|
|
||||||
privateKeyFile:
|
|
||||||
sniCertKey:
|
|
||||||
|
|
||||||
zmon:
|
|
||||||
kariosdbEndpoint:
|
|
||||||
tokenName:
|
|
||||||
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 100Mi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 100Mi
|
|
146
docs/rbac.yaml
146
docs/rbac.yaml
@ -1,146 +0,0 @@
|
|||||||
kind: ServiceAccount
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: custom-metrics-apiserver
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: custom-metrics-server-resources
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- custom.metrics.k8s.io
|
|
||||||
resources: ["*"]
|
|
||||||
verbs: ["*"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: external-metrics-server-resources
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- external.metrics.k8s.io
|
|
||||||
resources: ["*"]
|
|
||||||
verbs: ["*"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: custom-metrics-resource-reader
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- namespaces
|
|
||||||
- pods
|
|
||||||
- services
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: custom-metrics-resource-collector
|
|
||||||
rules:
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- events
|
|
||||||
verbs:
|
|
||||||
- create
|
|
||||||
- patch
|
|
||||||
- apiGroups:
|
|
||||||
- ""
|
|
||||||
resources:
|
|
||||||
- pods
|
|
||||||
verbs:
|
|
||||||
- list
|
|
||||||
- apiGroups:
|
|
||||||
- apps
|
|
||||||
resources:
|
|
||||||
- deployments
|
|
||||||
- statefulsets
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- apiGroups:
|
|
||||||
- extensions
|
|
||||||
resources:
|
|
||||||
- ingresses
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- apiGroups:
|
|
||||||
- autoscaling
|
|
||||||
resources:
|
|
||||||
- horizontalpodautoscalers
|
|
||||||
verbs:
|
|
||||||
- get
|
|
||||||
- list
|
|
||||||
- watch
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: hpa-controller-custom-metrics
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: custom-metrics-server-resources
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: horizontal-pod-autoscaler
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: hpa-controller-external-metrics
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: external-metrics-server-resources
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: horizontal-pod-autoscaler
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: custom-metrics-auth-reader
|
|
||||||
namespace: kube-system
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: Role
|
|
||||||
name: extension-apiserver-authentication-reader
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: custom-metrics-apiserver
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: custom-metrics:system:auth-delegator
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: system:auth-delegator
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: custom-metrics-apiserver
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: custom-metrics-resource-collector
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: custom-metrics-resource-collector
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: custom-metrics-apiserver
|
|
||||||
namespace: kube-system
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user