mirror of
https://github.com/zalando-incubator/kube-metrics-adapter.git
synced 2025-05-12 08:21:54 +00:00
Compare commits
2 Commits
gh-pages
...
automate/r
Author | SHA1 | Date | |
---|---|---|---|
37547ce460 | |||
7a0c251972 |
17
.github/ISSUE_TEMPLATE.md
vendored
Normal file
17
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
## Expected Behavior
|
||||
|
||||
|
||||
## Actual Behavior
|
||||
|
||||
|
||||
## Steps to Reproduce the Problem
|
||||
|
||||
1.
|
||||
1.
|
||||
1.
|
||||
|
||||
## Specifications
|
||||
|
||||
- Version:
|
||||
- Platform:
|
||||
- Subsystem:
|
31
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
31
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
# 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
Normal file
14
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
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
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
build/
|
||||
apiserver.local.config/
|
||||
.idea/
|
||||
vendor/
|
19
.golangci.yml
Normal file
19
.golangci.yml
Normal file
@ -0,0 +1,19 @@
|
||||
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
Normal file
20
.travis.yml
Normal file
@ -0,0 +1,20 @@
|
||||
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
|
9
.zappr.yaml
Normal file
9
.zappr.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
# for github.com
|
||||
approvals:
|
||||
groups:
|
||||
zalando:
|
||||
minimum: 2
|
||||
from:
|
||||
orgs:
|
||||
- "zalando"
|
||||
X-Zalando-Team: teapot
|
74
CODE_OF_CONDUCT.md
Normal file
74
CODE_OF_CONDUCT.md
Normal file
@ -0,0 +1,74 @@
|
||||
# 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/
|
86
CONTRIBUTING.md
Normal file
86
CONTRIBUTING.md
Normal file
@ -0,0 +1,86 @@
|
||||
# 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!**
|
6
CONTRIBUTORS.md
Normal file
6
CONTRIBUTORS.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Project Contributors
|
||||
|
||||
All external contributors to the project, we are grateful for all their help
|
||||
|
||||
## Contributors sorted alphabetically
|
||||
|
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
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
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
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.
|
2
MAINTAINERS
Normal file
2
MAINTAINERS
Normal file
@ -0,0 +1,2 @@
|
||||
Mikkel Larsen <mikkel.larsen@zalando.de>
|
||||
Team Teapot <team-teapot@zalando.de>
|
56
Makefile
Normal file
56
Makefile
Normal file
@ -0,0 +1,56 @@
|
||||
.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)"
|
8
SECURITY.md
Normal file
8
SECURITY.md
Normal file
@ -0,0 +1,8 @@
|
||||
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.
|
53
delivery.yaml
Normal file
53
delivery.yaml
Normal file
@ -0,0 +1,53 @@
|
||||
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
|
13
docs/custom-metrics-apiservice.yaml
Normal file
13
docs/custom-metrics-apiservice.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
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
|
40
docs/deployment.yaml
Normal file
40
docs/deployment.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
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
|
13
docs/external-metrics-apiservice.yaml
Normal file
13
docs/external-metrics-apiservice.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
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
|
9
docs/helm/Chart.yaml
Normal file
9
docs/helm/Chart.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
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
|
15
docs/helm/templates/custom-metrics-apiservice.yaml
Normal file
15
docs/helm/templates/custom-metrics-apiservice.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
{{- 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}}
|
191
docs/helm/templates/deployment.yaml
Normal file
191
docs/helm/templates/deployment.yaml
Normal file
@ -0,0 +1,191 @@
|
||||
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 }}
|
15
docs/helm/templates/external-metrics-apiservice.yaml
Normal file
15
docs/helm/templates/external-metrics-apiservice.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
{{- 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}}
|
154
docs/helm/templates/rbac.yaml
Normal file
154
docs/helm/templates/rbac.yaml
Normal file
@ -0,0 +1,154 @@
|
||||
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 }}
|
5
docs/helm/templates/service-account.yaml
Normal file
5
docs/helm/templates/service-account.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
kind: ServiceAccount
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: kube-metrics-adapter
|
||||
namespace: {{ .Values.namespace }}
|
11
docs/helm/templates/service.yaml
Normal file
11
docs/helm/templates/service.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
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
|
94
docs/helm/values.yaml
Normal file
94
docs/helm/values.yaml
Normal file
@ -0,0 +1,94 @@
|
||||
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
Normal file
146
docs/rbac.yaml
Normal file
@ -0,0 +1,146 @@
|
||||
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