Skip to content

Commit 0b67b87

Browse files
authored
Revert "Import cortex mixin from upstream (#373)"
This reverts commit 025285e.
1 parent 025285e commit 0b67b87

37 files changed

+15
-6302
lines changed

.github/workflows/test-build-deploy.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
lint:
1111
runs-on: ubuntu-20.04
1212
container:
13-
image: us.gcr.io/kubernetes-dev/mimir-build-image:20211018_import-cortex-mixin-e7b4eab3c
13+
image: us.gcr.io/kubernetes-dev/mimir-build-image:add-prettier-08d2e2a61
1414
credentials:
1515
username: _json_key
1616
password: ${{ secrets.gcr_json_key }}
@@ -36,8 +36,6 @@ jobs:
3636
run: make BUILD_IN_CONTAINER=false check-protos
3737
- name: Check Generated Documentation
3838
run: make BUILD_IN_CONTAINER=false check-doc
39-
- name: Check Mixin
40-
run: make BUILD_IN_CONTAINER=false check-mixin
4139
- name: Check White Noise.
4240
run: make BUILD_IN_CONTAINER=false check-white-noise
4341
- name: Check License Header
@@ -46,7 +44,7 @@ jobs:
4644
test:
4745
runs-on: ubuntu-20.04
4846
container:
49-
image: us.gcr.io/kubernetes-dev/mimir-build-image:20211018_import-cortex-mixin-e7b4eab3c
47+
image: us.gcr.io/kubernetes-dev/mimir-build-image:add-prettier-08d2e2a61
5048
credentials:
5149
username: _json_key
5250
password: ${{ secrets.gcr_json_key }}
@@ -70,7 +68,7 @@ jobs:
7068
build:
7169
runs-on: ubuntu-20.04
7270
container:
73-
image: us.gcr.io/kubernetes-dev/mimir-build-image:20211018_import-cortex-mixin-e7b4eab3c
71+
image: us.gcr.io/kubernetes-dev/mimir-build-image:add-prettier-08d2e2a61
7472
credentials:
7573
username: _json_key
7674
password: ${{ secrets.gcr_json_key }}

Makefile

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# WARNING: do not commit to a repository!
33
-include Makefile.local
44

5-
.PHONY: all test integration-tests cover clean images protos exes dist doc clean-doc check-doc push-multiarch-build-image license check-license format check-mixin check-mixin-jb check-mixin-mixtool checkin-mixin-playbook build-mixin format-mixin
5+
.PHONY: all test integration-tests cover clean images protos exes dist doc clean-doc check-doc push-multiarch-build-image license check-license format
66
.DEFAULT_GOAL := all
77

88
# Version number
@@ -25,12 +25,6 @@ GIT_REVISION := $(shell git rev-parse --short HEAD)
2525
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
2626
UPTODATE := .uptodate
2727

28-
# path to jsonnetfmt
29-
JSONNET_FMT := jsonnetfmt
30-
31-
# path to the mimir/mixin
32-
MIXIN_PATH := operations/mimir-mixin
33-
3428
.PHONY: image-tag
3529
image-tag:
3630
@echo $(IMAGE_TAG)
@@ -126,7 +120,7 @@ mimir-build-image/$(UPTODATE): mimir-build-image/*
126120
# All the boiler plate for building golang follows:
127121
SUDO := $(shell docker info >/dev/null 2>&1 || echo "sudo -E")
128122
BUILD_IN_CONTAINER := true
129-
LATEST_BUILD_IMAGE_TAG ?= 20211018_import-cortex-mixin-e7b4eab3c
123+
LATEST_BUILD_IMAGE_TAG ?= add-prettier-08d2e2a61
130124

131125
# TTY is parameterized to allow Google Cloud Builder to run builds,
132126
# as it currently disallows TTY devices. This value needs to be overridden
@@ -320,33 +314,6 @@ clean-white-noise:
320314
check-white-noise: clean-white-noise
321315
@git diff --exit-code --quiet -- '*.md' || (echo "Please remove trailing whitespaces running 'make clean-white-noise'" && false)
322316

323-
check-mixin: format-mixin check-mixin-jb check-mixin-mixtool check-mixin-playbook
324-
@git diff --exit-code --quiet -- $(MIXIN_PATH) || (echo "Please format mixin by running 'make format-mixin'" && false)
325-
326-
@cd $(MIXIN_PATH) && \
327-
jb install && \
328-
mixtool lint mixin.libsonnet
329-
330-
check-mixin-jb:
331-
@cd $(MIXIN_PATH) && \
332-
jb install
333-
334-
check-mixin-mixtool: check-mixin-jb
335-
@cd $(MIXIN_PATH) && \
336-
mixtool lint mixin.libsonnet
337-
338-
check-mixin-playbook: build-mixin
339-
@$(MIXIN_PATH)/scripts/lint-playbooks.sh
340-
341-
build-mixin: check-mixin-jb
342-
@rm -rf $(MIXIN_PATH)/out && mkdir $(MIXIN_PATH)/out
343-
@cd $(MIXIN_PATH) && \
344-
mixtool generate all --output-alerts out/alerts.yaml --output-rules out/rules.yaml --directory out/dashboards mixin.libsonnet && \
345-
zip -q -r mimir-mixin.zip out
346-
347-
format-mixin:
348-
@find $(MIXIN_PATH) -type f -name '*.libsonnet' -print -o -name '*.jsonnet' -print | xargs jsonnetfmt -i
349-
350317
web-serve:
351318
cd website && hugo --config config.toml --minify -v server
352319

mimir-build-image/Dockerfile

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
FROM golang:1.16.6-buster
77
ARG goproxyValue
88
ENV GOPROXY=${goproxyValue}
9-
RUN apt-get update && apt-get install -y curl python-requests python-yaml file jq zip unzip protobuf-compiler libprotobuf-dev shellcheck && \
9+
RUN apt-get update && apt-get install -y curl python-requests python-yaml file jq unzip protobuf-compiler libprotobuf-dev shellcheck && \
1010
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1111
RUN go get -u golang.org/x/tools/cmd/goimports@3fce476f0a782aeb5034d592c189e63be4ba6c9e
1212
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
@@ -36,19 +36,15 @@ RUN GOARCH=$(go env GOARCH) && \
3636

3737
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b /usr/bin v1.27.0
3838

39-
RUN GO111MODULE=on \
40-
go get github.com/client9/misspell/cmd/[email protected] && \
41-
go get github.com/golang/protobuf/[email protected] && \
42-
go get github.com/gogo/protobuf/[email protected] && \
43-
go get github.com/gogo/protobuf/[email protected] && \
44-
go get github.com/weaveworks/tools/cover@bdd647e92546027e12cdde3ae0714bb495e43013 && \
45-
go get github.com/fatih/[email protected] && \
46-
go get github.com/campoy/[email protected] && \
47-
go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected] && \
48-
go get github.com/monitoring-mixins/mixtool/cmd/mixtool@bca3066 && \
49-
go get github.com/mikefarah/yq/[email protected] && \
50-
go get github.com/google/go-jsonnet/cmd/[email protected] && \
51-
rm -rf /go/pkg /go/src /root/.cache
39+
RUN GO111MODULE=on go get \
40+
github.com/client9/misspell/cmd/[email protected] \
41+
github.com/golang/protobuf/[email protected] \
42+
github.com/gogo/protobuf/[email protected] \
43+
github.com/gogo/protobuf/[email protected] \
44+
github.com/weaveworks/tools/cover@bdd647e92546027e12cdde3ae0714bb495e43013 \
45+
github.com/fatih/[email protected] \
46+
github.com/campoy/[email protected] \
47+
&& rm -rf /go/pkg /go/src /root/.cache
5248

5349
ENV NODE_PATH=/usr/lib/node_modules
5450
COPY build.sh /

operations/mimir-mixin/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

operations/mimir-mixin/README.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

operations/mimir-mixin/alerts.libsonnet

Lines changed: 0 additions & 13 deletions
This file was deleted.

operations/mimir-mixin/alerts/alertmanager.libsonnet

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)