mirror of
https://github.com/zalando-incubator/kube-metrics-adapter.git
synced 2025-05-13 00:42:05 +00:00
Compare commits
179 Commits
v0.1.10
...
update-dep
Author | SHA1 | Date | |
---|---|---|---|
24b7276282 | |||
542d90d9fe | |||
0f359920af | |||
54e2d2d564 | |||
16ec43c361 | |||
ffcbfcee48 | |||
69f95534e8 | |||
c2179a35ba | |||
35e3fe83e8 | |||
69df60e724 | |||
d171e049bf | |||
b89ca19e6a | |||
a276b64576 | |||
ff6d479f1a | |||
cd986058e4 | |||
d6a33fed63 | |||
b8532b756b | |||
f28653de74 | |||
2f5d3f5a42 | |||
153d754353 | |||
02ec2282ab | |||
65dd585813 | |||
aa7b64e637 | |||
7633ac551e | |||
a103a3295e | |||
f63915f7ff | |||
c4a1e08fdf | |||
61e0336247 | |||
2492bdf5c1 | |||
88b7d747d1 | |||
0794873fcb | |||
e2a922f110 | |||
b631a4fe08 | |||
90fea54307 | |||
8b6a54627d | |||
75738f1eb7 | |||
d8934ebbc1 | |||
17bef811f3 | |||
7a041c991a | |||
979ae68eab | |||
e9a209aa31 | |||
838edd9082 | |||
c50d9ccd18 | |||
c60253e90c | |||
680e0feea1 | |||
070f9ab299 | |||
8ba4d19c35 | |||
37bf73c7fe | |||
d01a3f6347 | |||
50633ba06c | |||
bce27b748c | |||
9e057c1075 | |||
55ce2d8c3d | |||
37969486fe | |||
1be6357c8e | |||
7b592c6832 | |||
203aaeafb9 | |||
5926f1aea1 | |||
be1e1c635d | |||
094a9f9b9d | |||
47d34b328c | |||
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 |
20
.github/workflows/ci.yaml
vendored
20
.github/workflows/ci.yaml
vendored
@ -1,7 +1,11 @@
|
|||||||
name: ci
|
name: ci
|
||||||
on: [push, pull_request]
|
on:
|
||||||
env:
|
push:
|
||||||
GO111MODULE: on
|
branches-ignore:
|
||||||
|
- 'gh-pages'
|
||||||
|
pull_request:
|
||||||
|
branches-ignore:
|
||||||
|
- 'gh-pages'
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -9,14 +13,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '^1.16'
|
go-version: '^1.19'
|
||||||
- run: go version
|
- run: go version
|
||||||
- run: go get github.com/mattn/goveralls
|
- run: go install github.com/mattn/goveralls@latest
|
||||||
env:
|
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||||
GO111MODULE: off
|
|
||||||
- run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_RELEASE}
|
|
||||||
env:
|
|
||||||
GOLANGCI_RELEASE: v1.37.0
|
|
||||||
- run: make build.docker
|
- run: make build.docker
|
||||||
- run: make test
|
- run: make test
|
||||||
- run: make check
|
- run: make check
|
||||||
|
72
.github/workflows/codeql-analysis.yml
vendored
Normal file
72
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
#
|
||||||
|
# ******** NOTE ********
|
||||||
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
|
# supported CodeQL languages.
|
||||||
|
#
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ "master" ]
|
||||||
|
schedule:
|
||||||
|
- cron: '29 17 * * 1'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'go' ]
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||||
|
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
|
||||||
|
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||||
|
# queries: security-extended,security-and-quality
|
||||||
|
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v2
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
|
|
||||||
|
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||||
|
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||||
|
|
||||||
|
# - run: |
|
||||||
|
# echo "Run, Build Application using script"
|
||||||
|
# ./location_of_script_within_repo/buildscript.sh
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
27
.github/workflows/release-chart.yml
vendored
Normal file
27
.github/workflows/release-chart.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Release Charts
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config user.name "$GITHUB_ACTOR"
|
||||||
|
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||||
|
|
||||||
|
- name: Run chart-releaser
|
||||||
|
uses: helm/chart-releaser-action@v1.4.0
|
||||||
|
with:
|
||||||
|
charts_dir: docs
|
||||||
|
env:
|
||||||
|
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
@ -1,19 +1,13 @@
|
|||||||
run:
|
run:
|
||||||
linters-settings:
|
concurrency: 4
|
||||||
golint:
|
|
||||||
min-confidence: 0.9
|
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
disable-all: true
|
disable-all: true
|
||||||
enable:
|
enable:
|
||||||
- staticcheck
|
|
||||||
- ineffassign
|
|
||||||
- golint
|
|
||||||
- goimports
|
|
||||||
- errcheck
|
- errcheck
|
||||||
issues:
|
- gosimple
|
||||||
exclude-rules:
|
- govet
|
||||||
# Exclude some staticcheck messages
|
- ineffassign
|
||||||
- linters:
|
|
||||||
- staticcheck
|
- staticcheck
|
||||||
text: "SA9003:"
|
- typecheck
|
||||||
|
- unused
|
||||||
|
@ -50,7 +50,7 @@ contribution is in line with our goals.
|
|||||||
- Make sure you sign-off on your commits `git commit -s -m "adding X to change Y"`
|
- Make sure you sign-off on your commits `git commit -s -m "adding X to change Y"`
|
||||||
- Write good commit messages (see below).
|
- Write good commit messages (see below).
|
||||||
- Push your changes to a topic branch in your fork of the repository.
|
- 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
|
- As you push your changes, update the pull request with new information and tasks as you complete them
|
||||||
- Project maintainers might comment on your work as you progress
|
- 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
|
- 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)
|
- Your pull request must receive a :thumbsup: from two [maintainers](MAINTAINERS)
|
||||||
|
10
Dockerfile
10
Dockerfile
@ -1,7 +1,11 @@
|
|||||||
FROM registry.opensource.zalan.do/library/alpine-3.12:latest
|
ARG BASE_IMAGE=registry.opensource.zalan.do/library/alpine-3.13:latest
|
||||||
|
FROM ${BASE_IMAGE}
|
||||||
LABEL maintainer="Team Teapot @ Zalando SE <team-teapot@zalando.de>"
|
LABEL maintainer="Team Teapot @ Zalando SE <team-teapot@zalando.de>"
|
||||||
|
|
||||||
# add binary
|
RUN apk add --no-cache tzdata
|
||||||
ADD build/linux/kube-metrics-adapter /
|
|
||||||
|
ARG TARGETARCH
|
||||||
|
|
||||||
|
ADD build/linux/${TARGETARCH}/kube-metrics-adapter /
|
||||||
|
|
||||||
ENTRYPOINT ["/kube-metrics-adapter"]
|
ENTRYPOINT ["/kube-metrics-adapter"]
|
||||||
|
35
Makefile
35
Makefile
@ -10,6 +10,10 @@ GOPKGS = $(shell go list ./...)
|
|||||||
BUILD_FLAGS ?= -v
|
BUILD_FLAGS ?= -v
|
||||||
OPENAPI ?= pkg/api/generated/openapi/zz_generated.openapi.go
|
OPENAPI ?= pkg/api/generated/openapi/zz_generated.openapi.go
|
||||||
LDFLAGS ?= -X main.version=$(VERSION) -w -s
|
LDFLAGS ?= -X main.version=$(VERSION) -w -s
|
||||||
|
CRD_SOURCES = $(shell find pkg/apis/zalando.org -name '*.go')
|
||||||
|
CRD_TYPE_SOURCE = pkg/apis/zalando.org/v1/types.go
|
||||||
|
GENERATED_CRDS = docs/scaling_schedules_crd.yaml
|
||||||
|
GENERATED = pkg/apis/zalando.org/v1/zz_generated.deepcopy.go
|
||||||
|
|
||||||
|
|
||||||
default: build.local
|
default: build.local
|
||||||
@ -18,14 +22,22 @@ clean:
|
|||||||
rm -rf build
|
rm -rf build
|
||||||
rm -rf $(OPENAPI)
|
rm -rf $(OPENAPI)
|
||||||
|
|
||||||
test:
|
test: $(GENERATED)
|
||||||
go test -v -coverprofile=profile.cov $(GOPKGS)
|
go test -v -coverprofile=profile.cov $(GOPKGS)
|
||||||
|
|
||||||
check:
|
check: $(GENERATED)
|
||||||
go mod download
|
go mod download
|
||||||
golangci-lint run --timeout=2m ./...
|
golangci-lint run --timeout=2m ./...
|
||||||
|
|
||||||
|
|
||||||
|
$(GENERATED): go.mod $(CRD_TYPE_SOURCE) $(OPENAPI)
|
||||||
|
./hack/update-codegen.sh
|
||||||
|
|
||||||
|
$(GENERATED_CRDS): $(GENERATED) $(CRD_SOURCES)
|
||||||
|
go run sigs.k8s.io/controller-tools/cmd/controller-gen crd:crdVersions=v1 paths=./pkg/apis/... output:crd:dir=docs || /bin/true || true
|
||||||
|
mv docs/zalando.org_clusterscalingschedules.yaml docs/cluster_scaling_schedules_crd.yaml
|
||||||
|
mv docs/zalando.org_scalingschedules.yaml docs/scaling_schedules_crd.yaml
|
||||||
|
|
||||||
$(OPENAPI): go.mod
|
$(OPENAPI): go.mod
|
||||||
go run k8s.io/kube-openapi/cmd/openapi-gen \
|
go run k8s.io/kube-openapi/cmd/openapi-gen \
|
||||||
--go-header-file hack/boilerplate.go.txt \
|
--go-header-file hack/boilerplate.go.txt \
|
||||||
@ -36,21 +48,26 @@ $(OPENAPI): go.mod
|
|||||||
-O zz_generated.openapi \
|
-O zz_generated.openapi \
|
||||||
-r /dev/null
|
-r /dev/null
|
||||||
|
|
||||||
build.local: build/$(BINARY)
|
build.local: build/$(BINARY) $(GENERATED_CRDS)
|
||||||
build.linux: build/linux/$(BINARY)
|
build.linux: build/linux/$(BINARY)
|
||||||
build.osx: build/osx/$(BINARY)
|
build.linux.amd64: build/linux/amd64/$(BINARY)
|
||||||
|
build.linux.arm64: build/linux/arm64/$(BINARY)
|
||||||
|
|
||||||
build/$(BINARY): go.mod $(SOURCES) $(OPENAPI)
|
|
||||||
|
build/$(BINARY): go.mod $(SOURCES) $(GENERATED)
|
||||||
CGO_ENABLED=0 go build -o build/$(BINARY) $(BUILD_FLAGS) -ldflags "$(LDFLAGS)" .
|
CGO_ENABLED=0 go build -o build/$(BINARY) $(BUILD_FLAGS) -ldflags "$(LDFLAGS)" .
|
||||||
|
|
||||||
build/linux/$(BINARY): go.mod $(SOURCES) $(OPENAPI)
|
build/linux/$(BINARY): go.mod $(SOURCES) $(GENERATED)
|
||||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build $(BUILD_FLAGS) -o build/linux/$(BINARY) -ldflags "$(LDFLAGS)" .
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build $(BUILD_FLAGS) -o build/linux/$(BINARY) -ldflags "$(LDFLAGS)" .
|
||||||
|
|
||||||
build/osx/$(BINARY): go.mod $(SOURCES) $(OPENAPI)
|
build/linux/amd64/$(BINARY): go.mod $(SOURCES)
|
||||||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build $(BUILD_FLAGS) -o build/osx/$(BINARY) -ldflags "$(LDFLAGS)" .
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build $(BUILD_FLAGS) -o build/linux/amd64/$(BINARY) -ldflags "$(LDFLAGS)" .
|
||||||
|
|
||||||
|
build/linux/arm64/$(BINARY): go.mod $(SOURCES)
|
||||||
|
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build $(BUILD_FLAGS) -o build/linux/arm64/$(BINARY) -ldflags "$(LDFLAGS)" .
|
||||||
|
|
||||||
build.docker: build.linux
|
build.docker: build.linux
|
||||||
docker build --rm -t "$(IMAGE):$(TAG)" -f $(DOCKERFILE) .
|
docker build --rm -t "$(IMAGE):$(TAG)" -f $(DOCKERFILE) --build-arg TARGETARCH= .
|
||||||
|
|
||||||
build.push: build.docker
|
build.push: build.docker
|
||||||
docker push "$(IMAGE):$(TAG)"
|
docker push "$(IMAGE):$(TAG)"
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
version: "2017-09-20"
|
version: "2017-09-20"
|
||||||
pipeline:
|
pipeline:
|
||||||
- id: build
|
- id: build
|
||||||
overlay: ci/golang
|
vm_config:
|
||||||
|
type: linux
|
||||||
|
image: "cdp-runtime/go"
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- /go/pkg/mod # pkg cache for Go modules
|
- /go/pkg/mod # pkg cache for Go modules
|
||||||
@ -28,3 +30,17 @@ pipeline:
|
|||||||
IMAGE=$IMAGE VERSION=$VERSION make build.docker
|
IMAGE=$IMAGE VERSION=$VERSION make build.docker
|
||||||
git diff --stat --exit-code
|
git diff --stat --exit-code
|
||||||
IMAGE=$IMAGE VERSION=$VERSION make build.push
|
IMAGE=$IMAGE VERSION=$VERSION make build.push
|
||||||
|
- desc: Build and push image to Zalando's registry
|
||||||
|
cmd: |
|
||||||
|
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
|
||||||
|
IMAGE=container-registry-test.zalando.net/teapot/kube-metrics-adapter
|
||||||
|
VERSION=$(git describe --tags --always)
|
||||||
|
else
|
||||||
|
IMAGE=container-registry-test.zalando.net/teapot/kube-metrics-adapter-test
|
||||||
|
VERSION=$CDP_BUILD_VERSION
|
||||||
|
fi
|
||||||
|
make build.linux.amd64 build.linux.arm64
|
||||||
|
|
||||||
|
docker buildx create --config /etc/cdp-buildkitd.toml --driver-opt network=host --bootstrap --use
|
||||||
|
docker buildx build --rm --build-arg BASE_IMAGE=container-registry.zalando.net/library/alpine-3:latest -t "${IMAGE}:${VERSION}" --platform linux/amd64,linux/arm64 --push .
|
||||||
|
cdp-promote-image "${IMAGE}:${VERSION}"
|
||||||
|
148
docs/cluster_scaling_schedules_crd.yaml
Normal file
148
docs/cluster_scaling_schedules_crd.yaml
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
controller-gen.kubebuilder.io/version: v0.8.0
|
||||||
|
creationTimestamp: null
|
||||||
|
name: clusterscalingschedules.zalando.org
|
||||||
|
spec:
|
||||||
|
group: zalando.org
|
||||||
|
names:
|
||||||
|
kind: ClusterScalingSchedule
|
||||||
|
listKind: ClusterScalingScheduleList
|
||||||
|
plural: clusterscalingschedules
|
||||||
|
singular: clusterscalingschedule
|
||||||
|
scope: Cluster
|
||||||
|
versions:
|
||||||
|
- additionalPrinterColumns:
|
||||||
|
- description: Whether one or more schedules are currently active.
|
||||||
|
jsonPath: .status.active
|
||||||
|
name: Active
|
||||||
|
type: boolean
|
||||||
|
name: v1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ClusterScalingSchedule describes a cluster scoped time based
|
||||||
|
metric to be used in autoscaling operations.
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: ScalingScheduleSpec is the spec part of the ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
scalingWindowDurationMinutes:
|
||||||
|
description: Fade the scheduled values in and out over this many minutes.
|
||||||
|
If unset, the default per-cluster value will be used.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
schedules:
|
||||||
|
description: Schedules is the list of schedules for this ScalingSchedule
|
||||||
|
resource. All the schedules defined here will result on the value
|
||||||
|
to the same metric. New metrics require a new ScalingSchedule resource.
|
||||||
|
items:
|
||||||
|
description: Schedule is the schedule details to be used inside
|
||||||
|
a ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
date:
|
||||||
|
description: Defines the starting date of a OneTime schedule.
|
||||||
|
It has to be a RFC3339 formatted date.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
durationMinutes:
|
||||||
|
description: The duration in minutes (default 0) that the configured
|
||||||
|
value will be returned for the defined schedule.
|
||||||
|
type: integer
|
||||||
|
endDate:
|
||||||
|
description: Defines the ending date of a OneTime schedule.
|
||||||
|
It must be a RFC3339 formatted date.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
period:
|
||||||
|
description: Defines the details of a Repeating schedule.
|
||||||
|
properties:
|
||||||
|
days:
|
||||||
|
description: The days that this schedule will be active.
|
||||||
|
items:
|
||||||
|
description: ScheduleDay represents the valid inputs for
|
||||||
|
days in a SchedulePeriod.
|
||||||
|
enum:
|
||||||
|
- Sun
|
||||||
|
- Mon
|
||||||
|
- Tue
|
||||||
|
- Wed
|
||||||
|
- Thu
|
||||||
|
- Fri
|
||||||
|
- Sat
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
endTime:
|
||||||
|
description: The endTime has the format HH:MM
|
||||||
|
pattern: (([0-1][0-9])|([2][0-3])):([0-5][0-9])
|
||||||
|
type: string
|
||||||
|
startTime:
|
||||||
|
description: The startTime has the format HH:MM
|
||||||
|
pattern: (([0-1][0-9])|([2][0-3])):([0-5][0-9])
|
||||||
|
type: string
|
||||||
|
timezone:
|
||||||
|
description: The location name corresponding to a file in
|
||||||
|
the IANA Time Zone database, like Europe/Berlin.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- days
|
||||||
|
- startTime
|
||||||
|
- timezone
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
description: Defines if the schedule is a OneTime schedule or
|
||||||
|
Repeating one. If OneTime, date has to be defined. If Repeating,
|
||||||
|
Period has to be defined.
|
||||||
|
enum:
|
||||||
|
- OneTime
|
||||||
|
- Repeating
|
||||||
|
type: string
|
||||||
|
value:
|
||||||
|
description: The metric value that will be returned for the
|
||||||
|
defined schedule.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- value
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- schedules
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: ScalingScheduleStatus is the status section of the ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
active:
|
||||||
|
default: false
|
||||||
|
description: Active is true if at least one of the schedules defined
|
||||||
|
in the scaling schedule is currently active.
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
status:
|
||||||
|
acceptedNames:
|
||||||
|
kind: ""
|
||||||
|
plural: ""
|
||||||
|
conditions: []
|
||||||
|
storedVersions: []
|
@ -1,4 +1,4 @@
|
|||||||
apiVersion: apiregistration.k8s.io/v1beta1
|
apiVersion: apiregistration.k8s.io/v1
|
||||||
kind: APIService
|
kind: APIService
|
||||||
metadata:
|
metadata:
|
||||||
name: v1beta1.custom.metrics.k8s.io
|
name: v1beta1.custom.metrics.k8s.io
|
||||||
|
@ -28,6 +28,7 @@ spec:
|
|||||||
- --prometheus-server=http://prometheus.kube-system.svc.cluster.local
|
- --prometheus-server=http://prometheus.kube-system.svc.cluster.local
|
||||||
- --skipper-ingress-metrics
|
- --skipper-ingress-metrics
|
||||||
- --aws-external-metrics
|
- --aws-external-metrics
|
||||||
|
- --scaling-schedule
|
||||||
env:
|
env:
|
||||||
- name: AWS_REGION
|
- name: AWS_REGION
|
||||||
value: eu-central-1
|
value: eu-central-1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
apiVersion: apiregistration.k8s.io/v1beta1
|
apiVersion: apiregistration.k8s.io/v1
|
||||||
kind: APIService
|
kind: APIService
|
||||||
metadata:
|
metadata:
|
||||||
name: v1beta1.external.metrics.k8s.io
|
name: v1beta1.external.metrics.k8s.io
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: kube-metrics-adapter
|
name: kube-metrics-adapter
|
||||||
version: 0.1.9
|
version: 0.2.0
|
||||||
description: kube-metrics-adapter helm chart
|
description: kube-metrics-adapter helm chart
|
||||||
home: https://github.com/zalando-incubator/kube-metrics-adapter
|
home: https://github.com/zalando-incubator/kube-metrics-adapter
|
||||||
maintainers:
|
maintainers:
|
||||||
|
149
docs/helm/templates/cluster_scaling_schedules_crd.yaml
Normal file
149
docs/helm/templates/cluster_scaling_schedules_crd.yaml
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
{{- if .Values.scalingSchedule.enabled }}
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
controller-gen.kubebuilder.io/version: v0.8.0
|
||||||
|
creationTimestamp: null
|
||||||
|
name: clusterscalingschedules.zalando.org
|
||||||
|
spec:
|
||||||
|
group: zalando.org
|
||||||
|
names:
|
||||||
|
kind: ClusterScalingSchedule
|
||||||
|
listKind: ClusterScalingScheduleList
|
||||||
|
plural: clusterscalingschedules
|
||||||
|
singular: clusterscalingschedule
|
||||||
|
scope: Cluster
|
||||||
|
versions:
|
||||||
|
- additionalPrinterColumns:
|
||||||
|
- description: Whether one or more schedules are currently active.
|
||||||
|
jsonPath: .status.active
|
||||||
|
name: Active
|
||||||
|
type: boolean
|
||||||
|
name: v1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ClusterScalingSchedule describes a cluster scoped time based
|
||||||
|
metric to be used in autoscaling operations.
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: ScalingScheduleSpec is the spec part of the ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
scalingWindowDurationMinutes:
|
||||||
|
description: Fade the scheduled values in and out over this many minutes.
|
||||||
|
If unset, the default per-cluster value will be used.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
schedules:
|
||||||
|
description: Schedules is the list of schedules for this ScalingSchedule
|
||||||
|
resource. All the schedules defined here will result on the value
|
||||||
|
to the same metric. New metrics require a new ScalingSchedule resource.
|
||||||
|
items:
|
||||||
|
description: Schedule is the schedule details to be used inside
|
||||||
|
a ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
date:
|
||||||
|
description: Defines the starting date of a OneTime schedule.
|
||||||
|
It has to be a RFC3339 formatted date.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
durationMinutes:
|
||||||
|
description: The duration in minutes (default 0) that the configured
|
||||||
|
value will be returned for the defined schedule.
|
||||||
|
type: integer
|
||||||
|
endDate:
|
||||||
|
description: Defines the ending date of a OneTime schedule.
|
||||||
|
It must be a RFC3339 formatted date.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
period:
|
||||||
|
description: Defines the details of a Repeating schedule.
|
||||||
|
properties:
|
||||||
|
days:
|
||||||
|
description: The days that this schedule will be active.
|
||||||
|
items:
|
||||||
|
description: ScheduleDay represents the valid inputs for
|
||||||
|
days in a SchedulePeriod.
|
||||||
|
enum:
|
||||||
|
- Sun
|
||||||
|
- Mon
|
||||||
|
- Tue
|
||||||
|
- Wed
|
||||||
|
- Thu
|
||||||
|
- Fri
|
||||||
|
- Sat
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
endTime:
|
||||||
|
description: The endTime has the format HH:MM
|
||||||
|
pattern: (([0-1][0-9])|([2][0-3])):([0-5][0-9])
|
||||||
|
type: string
|
||||||
|
startTime:
|
||||||
|
description: The startTime has the format HH:MM
|
||||||
|
pattern: (([0-1][0-9])|([2][0-3])):([0-5][0-9])
|
||||||
|
type: string
|
||||||
|
timezone:
|
||||||
|
description: The location name corresponding to a file in
|
||||||
|
the IANA Time Zone database, like Europe/Berlin.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- days
|
||||||
|
- startTime
|
||||||
|
- timezone
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
description: Defines if the schedule is a OneTime schedule or
|
||||||
|
Repeating one. If OneTime, date has to be defined. If Repeating,
|
||||||
|
Period has to be defined.
|
||||||
|
enum:
|
||||||
|
- OneTime
|
||||||
|
- Repeating
|
||||||
|
type: string
|
||||||
|
value:
|
||||||
|
description: The metric value that will be returned for the
|
||||||
|
defined schedule.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- value
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- schedules
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: ScalingScheduleStatus is the status section of the ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
active:
|
||||||
|
default: false
|
||||||
|
description: Active is true if at least one of the schedules defined
|
||||||
|
in the scaling schedule is currently active.
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
status:
|
||||||
|
acceptedNames:
|
||||||
|
kind: ""
|
||||||
|
plural: ""
|
||||||
|
conditions: []
|
||||||
|
storedVersions: []
|
||||||
|
{{- end}}
|
@ -1,5 +1,5 @@
|
|||||||
{{- if .Values.enableCustomMetricsApi }}
|
{{- if .Values.enableCustomMetricsApi }}
|
||||||
apiVersion: apiregistration.k8s.io/v1beta1
|
apiVersion: apiregistration.k8s.io/v1
|
||||||
kind: APIService
|
kind: APIService
|
||||||
metadata:
|
metadata:
|
||||||
name: v1beta1.custom.metrics.k8s.io
|
name: v1beta1.custom.metrics.k8s.io
|
||||||
|
@ -16,8 +16,23 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
application: kube-metrics-adapter
|
application: kube-metrics-adapter
|
||||||
version: {{ .Values.registry.imageTag }}
|
version: {{ .Values.registry.imageTag }}
|
||||||
|
{{- if .Values.podAnnotations }}
|
||||||
|
annotations: {{- toYaml .Values.podAnnotations | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: kube-metrics-adapter
|
serviceAccountName: kube-metrics-adapter
|
||||||
|
{{- if .Values.nodeSelector }}
|
||||||
|
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.tolerations }}
|
||||||
|
tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.affinity }}
|
||||||
|
affinity: {{ toYaml .Values.affinity | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.priorityClassName }}
|
||||||
|
priorityClassName: {{ .Values.priorityClassName | quote }}
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: kube-metrics-adapter
|
- name: kube-metrics-adapter
|
||||||
image: {{ .Values.registry.image}}:{{ .Values.registry.imageTag }}
|
image: {{ .Values.registry.image}}:{{ .Values.registry.imageTag }}
|
||||||
@ -149,6 +164,9 @@ spec:
|
|||||||
{{- if .Values.skipperIngressMetrics }}
|
{{- if .Values.skipperIngressMetrics }}
|
||||||
- --skipper-ingress-metrics={{ .Values.skipperIngressMetrics }}
|
- --skipper-ingress-metrics={{ .Values.skipperIngressMetrics }}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
{{- if .Values.skipperRouteGroupMetrics }}
|
||||||
|
- --skipper-routegroup-metrics={{ .Values.skipperRouteGroupMetrics }}
|
||||||
|
{{- end}}
|
||||||
{{- if .Values.log.stderrThreshold }}
|
{{- if .Values.log.stderrThreshold }}
|
||||||
- --stderrthreshold={{ .Values.log.stderrThreshold }}
|
- --stderrthreshold={{ .Values.log.stderrThreshold }}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
@ -182,6 +200,9 @@ spec:
|
|||||||
{{- if .Values.zmon.tokenName }}
|
{{- if .Values.zmon.tokenName }}
|
||||||
- --zmon-token-name={{ .Values.zmon.tokenName }}
|
- --zmon-token-name={{ .Values.zmon.tokenName }}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
{{- if .Values.scalingSchedule.enabled }}
|
||||||
|
- --scaling-schedule
|
||||||
|
{{- end}}
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: {{ .Values.resources.limits.cpu }}
|
cpu: {{ .Values.resources.limits.cpu }}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{- if .Values.enableExternalMetricsApi }}
|
{{- if .Values.enableExternalMetricsApi }}
|
||||||
apiVersion: apiregistration.k8s.io/v1beta1
|
apiVersion: apiregistration.k8s.io/v1
|
||||||
kind: APIService
|
kind: APIService
|
||||||
metadata:
|
metadata:
|
||||||
name: v1beta1.external.metrics.k8s.io
|
name: v1beta1.external.metrics.k8s.io
|
||||||
|
@ -59,12 +59,22 @@ rules:
|
|||||||
- statefulsets
|
- statefulsets
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
{{- if .Values.skipperRouteGroupMetrics }}
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- extensions
|
- networking.k8s.io
|
||||||
resources:
|
resources:
|
||||||
- ingresses
|
- ingresses
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.skipperRouteGroupMetrics }}
|
||||||
|
- apiGroups:
|
||||||
|
- zalando.org
|
||||||
|
resources:
|
||||||
|
- routegroups
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
{{- end }}
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- autoscaling
|
- autoscaling
|
||||||
resources:
|
resources:
|
||||||
@ -73,6 +83,24 @@ rules:
|
|||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
{{- if .Values.scalingSchedule.enabled }}
|
||||||
|
- apiGroups:
|
||||||
|
- zalando.org
|
||||||
|
resources:
|
||||||
|
- clusterscalingschedules
|
||||||
|
- scalingschedules
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- zalando.org
|
||||||
|
resources:
|
||||||
|
- clusterscalingschedules/status
|
||||||
|
- scalingschedules/status
|
||||||
|
verbs:
|
||||||
|
- update
|
||||||
|
{{- end}}
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
|
151
docs/helm/templates/scaling_schedules_crd.yaml
Normal file
151
docs/helm/templates/scaling_schedules_crd.yaml
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
{{- if .Values.scalingSchedule.enabled }}
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
controller-gen.kubebuilder.io/version: v0.8.0
|
||||||
|
creationTimestamp: null
|
||||||
|
name: scalingschedules.zalando.org
|
||||||
|
spec:
|
||||||
|
group: zalando.org
|
||||||
|
names:
|
||||||
|
categories:
|
||||||
|
- all
|
||||||
|
kind: ScalingSchedule
|
||||||
|
listKind: ScalingScheduleList
|
||||||
|
plural: scalingschedules
|
||||||
|
singular: scalingschedule
|
||||||
|
scope: Namespaced
|
||||||
|
versions:
|
||||||
|
- additionalPrinterColumns:
|
||||||
|
- description: Whether one or more schedules are currently active.
|
||||||
|
jsonPath: .status.active
|
||||||
|
name: Active
|
||||||
|
type: boolean
|
||||||
|
name: v1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ScalingSchedule describes a namespaced time based metric to be
|
||||||
|
used in autoscaling operations.
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: ScalingScheduleSpec is the spec part of the ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
scalingWindowDurationMinutes:
|
||||||
|
description: Fade the scheduled values in and out over this many minutes.
|
||||||
|
If unset, the default per-cluster value will be used.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
schedules:
|
||||||
|
description: Schedules is the list of schedules for this ScalingSchedule
|
||||||
|
resource. All the schedules defined here will result on the value
|
||||||
|
to the same metric. New metrics require a new ScalingSchedule resource.
|
||||||
|
items:
|
||||||
|
description: Schedule is the schedule details to be used inside
|
||||||
|
a ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
date:
|
||||||
|
description: Defines the starting date of a OneTime schedule.
|
||||||
|
It has to be a RFC3339 formatted date.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
durationMinutes:
|
||||||
|
description: The duration in minutes (default 0) that the configured
|
||||||
|
value will be returned for the defined schedule.
|
||||||
|
type: integer
|
||||||
|
endDate:
|
||||||
|
description: Defines the ending date of a OneTime schedule.
|
||||||
|
It must be a RFC3339 formatted date.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
period:
|
||||||
|
description: Defines the details of a Repeating schedule.
|
||||||
|
properties:
|
||||||
|
days:
|
||||||
|
description: The days that this schedule will be active.
|
||||||
|
items:
|
||||||
|
description: ScheduleDay represents the valid inputs for
|
||||||
|
days in a SchedulePeriod.
|
||||||
|
enum:
|
||||||
|
- Sun
|
||||||
|
- Mon
|
||||||
|
- Tue
|
||||||
|
- Wed
|
||||||
|
- Thu
|
||||||
|
- Fri
|
||||||
|
- Sat
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
endTime:
|
||||||
|
description: The endTime has the format HH:MM
|
||||||
|
pattern: (([0-1][0-9])|([2][0-3])):([0-5][0-9])
|
||||||
|
type: string
|
||||||
|
startTime:
|
||||||
|
description: The startTime has the format HH:MM
|
||||||
|
pattern: (([0-1][0-9])|([2][0-3])):([0-5][0-9])
|
||||||
|
type: string
|
||||||
|
timezone:
|
||||||
|
description: The location name corresponding to a file in
|
||||||
|
the IANA Time Zone database, like Europe/Berlin.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- days
|
||||||
|
- startTime
|
||||||
|
- timezone
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
description: Defines if the schedule is a OneTime schedule or
|
||||||
|
Repeating one. If OneTime, date has to be defined. If Repeating,
|
||||||
|
Period has to be defined.
|
||||||
|
enum:
|
||||||
|
- OneTime
|
||||||
|
- Repeating
|
||||||
|
type: string
|
||||||
|
value:
|
||||||
|
description: The metric value that will be returned for the
|
||||||
|
defined schedule.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- value
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- schedules
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: ScalingScheduleStatus is the status section of the ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
active:
|
||||||
|
default: false
|
||||||
|
description: Active is true if at least one of the schedules defined
|
||||||
|
in the scaling schedule is currently active.
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
status:
|
||||||
|
acceptedNames:
|
||||||
|
kind: ""
|
||||||
|
plural: ""
|
||||||
|
conditions: []
|
||||||
|
storedVersions: []
|
||||||
|
{{- end}}
|
@ -4,7 +4,7 @@ replicas: 1
|
|||||||
|
|
||||||
registry:
|
registry:
|
||||||
image: registry.opensource.zalan.do/teapot/kube-metrics-adapter
|
image: registry.opensource.zalan.do/teapot/kube-metrics-adapter
|
||||||
imageTag: v0.1.9
|
imageTag: v0.2.0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
|
|
||||||
service:
|
service:
|
||||||
@ -22,6 +22,7 @@ http2MaxStreamsPerConnection:
|
|||||||
listerKubeConfig:
|
listerKubeConfig:
|
||||||
skipperBackendsAnnotation:
|
skipperBackendsAnnotation:
|
||||||
skipperIngressMetrics:
|
skipperIngressMetrics:
|
||||||
|
skipperRouteGroupMetrics:
|
||||||
token:
|
token:
|
||||||
vmodule:
|
vmodule:
|
||||||
|
|
||||||
@ -92,3 +93,17 @@ resources:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 100Mi
|
memory: 100Mi
|
||||||
|
|
||||||
|
scalingSchedule:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/os: linux
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
priorityClassName: ""
|
||||||
|
|
||||||
|
podAnnotations: {}
|
||||||
|
@ -64,12 +64,22 @@ rules:
|
|||||||
- statefulsets
|
- statefulsets
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
# only relevant if running with the flag:
|
||||||
|
# --skipper-ingress-metrics
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- extensions
|
- networking.k8s.io
|
||||||
resources:
|
resources:
|
||||||
- ingresses
|
- ingresses
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
# only relevant if running with the flag:
|
||||||
|
# --skipper-routegroup-metrics
|
||||||
|
- apiGroups:
|
||||||
|
- zalando.org
|
||||||
|
resources:
|
||||||
|
- routegroups
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- autoscaling
|
- autoscaling
|
||||||
resources:
|
resources:
|
||||||
@ -78,6 +88,22 @@ rules:
|
|||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- zalando.org
|
||||||
|
resources:
|
||||||
|
- clusterscalingschedules
|
||||||
|
- scalingschedules
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- zalando.org
|
||||||
|
resources:
|
||||||
|
- clusterscalingschedules/status
|
||||||
|
- scalingschedules/status
|
||||||
|
verbs:
|
||||||
|
- update
|
||||||
---
|
---
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
|
150
docs/scaling_schedules_crd.yaml
Normal file
150
docs/scaling_schedules_crd.yaml
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
controller-gen.kubebuilder.io/version: v0.8.0
|
||||||
|
creationTimestamp: null
|
||||||
|
name: scalingschedules.zalando.org
|
||||||
|
spec:
|
||||||
|
group: zalando.org
|
||||||
|
names:
|
||||||
|
categories:
|
||||||
|
- all
|
||||||
|
kind: ScalingSchedule
|
||||||
|
listKind: ScalingScheduleList
|
||||||
|
plural: scalingschedules
|
||||||
|
singular: scalingschedule
|
||||||
|
scope: Namespaced
|
||||||
|
versions:
|
||||||
|
- additionalPrinterColumns:
|
||||||
|
- description: Whether one or more schedules are currently active.
|
||||||
|
jsonPath: .status.active
|
||||||
|
name: Active
|
||||||
|
type: boolean
|
||||||
|
name: v1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: ScalingSchedule describes a namespaced time based metric to be
|
||||||
|
used in autoscaling operations.
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: ScalingScheduleSpec is the spec part of the ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
scalingWindowDurationMinutes:
|
||||||
|
description: Fade the scheduled values in and out over this many minutes.
|
||||||
|
If unset, the default per-cluster value will be used.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
schedules:
|
||||||
|
description: Schedules is the list of schedules for this ScalingSchedule
|
||||||
|
resource. All the schedules defined here will result on the value
|
||||||
|
to the same metric. New metrics require a new ScalingSchedule resource.
|
||||||
|
items:
|
||||||
|
description: Schedule is the schedule details to be used inside
|
||||||
|
a ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
date:
|
||||||
|
description: Defines the starting date of a OneTime schedule.
|
||||||
|
It has to be a RFC3339 formatted date.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
durationMinutes:
|
||||||
|
description: The duration in minutes (default 0) that the configured
|
||||||
|
value will be returned for the defined schedule.
|
||||||
|
type: integer
|
||||||
|
endDate:
|
||||||
|
description: Defines the ending date of a OneTime schedule.
|
||||||
|
It must be a RFC3339 formatted date.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
period:
|
||||||
|
description: Defines the details of a Repeating schedule.
|
||||||
|
properties:
|
||||||
|
days:
|
||||||
|
description: The days that this schedule will be active.
|
||||||
|
items:
|
||||||
|
description: ScheduleDay represents the valid inputs for
|
||||||
|
days in a SchedulePeriod.
|
||||||
|
enum:
|
||||||
|
- Sun
|
||||||
|
- Mon
|
||||||
|
- Tue
|
||||||
|
- Wed
|
||||||
|
- Thu
|
||||||
|
- Fri
|
||||||
|
- Sat
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
endTime:
|
||||||
|
description: The endTime has the format HH:MM
|
||||||
|
pattern: (([0-1][0-9])|([2][0-3])):([0-5][0-9])
|
||||||
|
type: string
|
||||||
|
startTime:
|
||||||
|
description: The startTime has the format HH:MM
|
||||||
|
pattern: (([0-1][0-9])|([2][0-3])):([0-5][0-9])
|
||||||
|
type: string
|
||||||
|
timezone:
|
||||||
|
description: The location name corresponding to a file in
|
||||||
|
the IANA Time Zone database, like Europe/Berlin.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- days
|
||||||
|
- startTime
|
||||||
|
- timezone
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
description: Defines if the schedule is a OneTime schedule or
|
||||||
|
Repeating one. If OneTime, date has to be defined. If Repeating,
|
||||||
|
Period has to be defined.
|
||||||
|
enum:
|
||||||
|
- OneTime
|
||||||
|
- Repeating
|
||||||
|
type: string
|
||||||
|
value:
|
||||||
|
description: The metric value that will be returned for the
|
||||||
|
defined schedule.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- value
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- schedules
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: ScalingScheduleStatus is the status section of the ScalingSchedule.
|
||||||
|
properties:
|
||||||
|
active:
|
||||||
|
default: false
|
||||||
|
description: Active is true if at least one of the schedules defined
|
||||||
|
in the scaling schedule is currently active.
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- spec
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
status:
|
||||||
|
acceptedNames:
|
||||||
|
kind: ""
|
||||||
|
plural: ""
|
||||||
|
conditions: []
|
||||||
|
storedVersions: []
|
@ -1,5 +1,5 @@
|
|||||||
FROM registry.opensource.zalan.do/stups/alpine:latest
|
FROM registry.opensource.zalan.do/library/alpine-3.13:latest
|
||||||
MAINTAINER Team Teapot @ Zalando SE <team-teapot@zalando.de>
|
LABEL maintainer="Team Teapot @ Zalando SE <team-teapot@zalando.de>"
|
||||||
|
|
||||||
# add binary
|
# add binary
|
||||||
ADD build/linux/custom-metrics-consumer /
|
ADD build/linux/custom-metrics-consumer /
|
||||||
|
@ -39,7 +39,7 @@ spec:
|
|||||||
- type: Object
|
- type: Object
|
||||||
object:
|
object:
|
||||||
describedObject:
|
describedObject:
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
name: custom-metrics-consumer
|
name: custom-metrics-consumer
|
||||||
metric:
|
metric:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: custom-metrics-consumer
|
name: custom-metrics-consumer
|
||||||
|
@ -11,7 +11,9 @@ import (
|
|||||||
func metricsHandler(w http.ResponseWriter, r *http.Request) {
|
func metricsHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
w.WriteHeader(200)
|
w.WriteHeader(200)
|
||||||
_, err := w.Write([]byte(fmt.Sprintf(`{"queue": {"length": %d}}`, size)))
|
_, err := w.Write([]byte(fmt.Sprintf(`{"queue": {"length": %d}}`, size)))
|
||||||
|
if err != nil {
|
||||||
log.Fatalf("failed to write: %v", err)
|
log.Fatalf("failed to write: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
146
go.mod
146
go.mod
@ -1,33 +1,127 @@
|
|||||||
module github.com/zalando-incubator/kube-metrics-adapter
|
module github.com/zalando-incubator/kube-metrics-adapter
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/NYTimes/gziphandler v1.0.1 // indirect
|
github.com/aws/aws-sdk-go v1.44.299
|
||||||
github.com/aws/aws-sdk-go v1.37.1
|
|
||||||
github.com/go-openapi/spec v0.20.2
|
|
||||||
github.com/influxdata/influxdb-client-go v0.2.0
|
github.com/influxdata/influxdb-client-go v0.2.0
|
||||||
github.com/influxdata/line-protocol v0.0.0-20201012155213-5f565037cbc9 // indirect
|
github.com/prometheus/client_golang v1.16.0
|
||||||
github.com/kubernetes-sigs/custom-metrics-apiserver v0.0.0-20201216091021-1b9fa998bbaa
|
github.com/prometheus/common v0.44.0
|
||||||
github.com/mattn/go-colorable v0.1.4 // indirect
|
github.com/sirupsen/logrus v1.9.3
|
||||||
github.com/mattn/go-isatty v0.0.10 // indirect
|
github.com/spf13/cobra v1.7.0
|
||||||
github.com/onsi/gomega v1.8.1 // indirect
|
github.com/spyzhov/ajson v0.8.0
|
||||||
github.com/prometheus/client_golang v1.9.0
|
github.com/stretchr/testify v1.8.4
|
||||||
github.com/prometheus/common v0.15.0
|
github.com/szuecs/routegroup-client v0.21.1
|
||||||
github.com/sirupsen/logrus v1.7.0
|
github.com/zalando-incubator/cluster-lifecycle-manager v0.0.0-20230601114834-6ed1bba3c85d
|
||||||
github.com/spf13/cobra v0.0.7
|
golang.org/x/net v0.12.0
|
||||||
github.com/spyzhov/ajson v0.4.2
|
golang.org/x/oauth2 v0.10.0
|
||||||
github.com/stretchr/testify v1.7.0
|
golang.org/x/sync v0.3.0
|
||||||
github.com/zalando-incubator/cluster-lifecycle-manager v0.0.0-20180921141935-824b77fb1f84
|
k8s.io/api v0.23.17
|
||||||
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 // indirect
|
k8s.io/apimachinery v0.23.17
|
||||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
k8s.io/apiserver v0.23.17
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
k8s.io/client-go v0.23.17
|
||||||
k8s.io/api v0.20.0
|
k8s.io/code-generator v0.23.17
|
||||||
k8s.io/apimachinery v0.20.0
|
k8s.io/component-base v0.23.17
|
||||||
k8s.io/apiserver v0.20.0
|
|
||||||
k8s.io/client-go v0.20.0
|
|
||||||
k8s.io/component-base v0.20.0
|
|
||||||
k8s.io/klog v1.0.0
|
k8s.io/klog v1.0.0
|
||||||
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd
|
k8s.io/kube-openapi v0.0.0-20230614213217-ba0abe644833
|
||||||
k8s.io/metrics v0.20.0
|
k8s.io/metrics v0.23.17
|
||||||
|
sigs.k8s.io/controller-tools v0.8.0
|
||||||
|
sigs.k8s.io/custom-metrics-apiserver v1.22.0
|
||||||
)
|
)
|
||||||
|
|
||||||
go 1.15
|
require (
|
||||||
|
github.com/NYTimes/gziphandler v1.1.1 // indirect
|
||||||
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
|
github.com/blang/semver v3.5.1+incompatible // indirect
|
||||||
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||||
|
github.com/coreos/go-semver v0.3.0 // indirect
|
||||||
|
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
||||||
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
|
github.com/emicklei/go-restful v2.16.0+incompatible // indirect
|
||||||
|
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
|
||||||
|
github.com/fatih/color v1.13.0 // indirect
|
||||||
|
github.com/felixge/httpsnoop v1.0.3 // indirect
|
||||||
|
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||||
|
github.com/go-logr/logr v1.2.4 // indirect
|
||||||
|
github.com/go-openapi/jsonpointer v0.19.6 // indirect
|
||||||
|
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||||
|
github.com/go-openapi/swag v0.22.4 // indirect
|
||||||
|
github.com/gobuffalo/flect v0.2.3 // indirect
|
||||||
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
|
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
|
||||||
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||||
|
github.com/golang/protobuf v1.5.3 // indirect
|
||||||
|
github.com/google/go-cmp v0.5.9 // indirect
|
||||||
|
github.com/google/gofuzz v1.2.0 // indirect
|
||||||
|
github.com/google/uuid v1.3.0 // indirect
|
||||||
|
github.com/googleapis/gnostic v0.5.5 // indirect
|
||||||
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||||
|
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||||
|
github.com/imdario/mergo v0.3.16 // indirect
|
||||||
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||||
|
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf // indirect
|
||||||
|
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||||
|
github.com/josharian/intern v1.0.0 // indirect
|
||||||
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
|
github.com/mailru/easyjson v0.7.7 // indirect
|
||||||
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||||
|
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||||
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
|
github.com/prometheus/client_model v0.4.0 // indirect
|
||||||
|
github.com/prometheus/procfs v0.10.1 // indirect
|
||||||
|
github.com/rogpeppe/go-internal v1.11.0 // indirect
|
||||||
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
|
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
|
||||||
|
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
|
||||||
|
go.etcd.io/etcd/client/v2 v2.305.7 // indirect
|
||||||
|
go.etcd.io/etcd/client/v3 v3.5.9 // indirect
|
||||||
|
go.opentelemetry.io/contrib v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel v1.14.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/metric v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/sdk v1.14.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
|
||||||
|
go.opentelemetry.io/otel/trace v1.14.0 // indirect
|
||||||
|
go.opentelemetry.io/proto/otlp v0.7.0 // indirect
|
||||||
|
go.uber.org/atomic v1.9.0 // indirect
|
||||||
|
go.uber.org/multierr v1.8.0 // indirect
|
||||||
|
go.uber.org/zap v1.21.0 // indirect
|
||||||
|
golang.org/x/crypto v0.11.0 // indirect
|
||||||
|
golang.org/x/mod v0.12.0 // indirect
|
||||||
|
golang.org/x/sys v0.10.0 // indirect
|
||||||
|
golang.org/x/term v0.10.0 // indirect
|
||||||
|
golang.org/x/text v0.11.0 // indirect
|
||||||
|
golang.org/x/time v0.3.0 // indirect
|
||||||
|
golang.org/x/tools v0.11.0 // indirect
|
||||||
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
|
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
|
||||||
|
google.golang.org/grpc v1.55.0 // indirect
|
||||||
|
google.golang.org/protobuf v1.31.0 // indirect
|
||||||
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
|
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
k8s.io/apiextensions-apiserver v0.23.0 // indirect
|
||||||
|
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c // indirect
|
||||||
|
k8s.io/klog/v2 v2.100.1 // indirect
|
||||||
|
k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect
|
||||||
|
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.35 // indirect
|
||||||
|
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||||
|
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||||
|
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||||
|
)
|
||||||
|
|
||||||
|
replace (
|
||||||
|
go.opentelemetry.io/otel => go.opentelemetry.io/otel v0.20.0
|
||||||
|
go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v0.20.0
|
||||||
|
go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v0.20.0
|
||||||
|
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65
|
||||||
|
)
|
||||||
|
|
||||||
|
go 1.20
|
||||||
|
@ -1,6 +1,23 @@
|
|||||||
// +build tools
|
// +build tools
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright 2019 The Kubernetes Authors.
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
|
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
|
||||||
package tools
|
package tools
|
||||||
|
|
||||||
import _ "k8s.io/kube-openapi/cmd/openapi-gen"
|
import (
|
||||||
|
_ "k8s.io/code-generator"
|
||||||
|
_ "k8s.io/kube-openapi/cmd/openapi-gen"
|
||||||
|
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
|
||||||
|
)
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user