Skip to content

Commit 1a97413

Browse files
chore(monitoring): adding nix package and readme generator
Signed-off-by: Abhilash Shetty <[email protected]>
1 parent 8ee3f91 commit 1a97413

File tree

17 files changed

+429
-359
lines changed

17 files changed

+429
-359
lines changed

.github/workflows/jsonnet-lint.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323

24-
- name: Jsonnet formatter
24+
- name: Jsonnet formatter and linter
2525
run: |
26-
cd jsonnet && make --always-make fmt
27-
28-
- name: Jsonnet linter
29-
run: |
30-
cd jsonnet && make --always-make lint
26+
cd jsonnet && make --always-make all
27+

deploy/charts/README.md

Lines changed: 115 additions & 133 deletions
Large diffs are not rendered by default.

deploy/charts/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Usage:
8080
{{- range $subchart }}
8181
{{- $values = index $values . }}
8282
{{- end }}
83-
{{- if $values.enabled }} # Add this condition to check if the subchart is enabled
83+
{{- if $values.enabled }}
8484
{{- include $template (dict "Chart" (dict "Name" (last $subchart)) "Values" $values "Release" $dot.Release "Capabilities" $dot.Capabilities) }}
8585
{{- end }}
8686
{{- end }}

jsonnet/Makefile

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,30 @@ SHELL=/usr/bin/env bash -o pipefail
22

33
BIN_DIR?=$(shell pwd)/tmp/bin
44

5-
EMBEDMD_BIN=$(BIN_DIR)/embedmd
65
JB_BIN=$(BIN_DIR)/jb
7-
GOJSONTOYAML_BIN=$(BIN_DIR)/gojsontoyaml
86
JSONNET_BIN=$(BIN_DIR)/jsonnet
97
JSONNETLINT_BIN=$(BIN_DIR)/jsonnet-lint
108
JSONNETFMT_BIN=$(BIN_DIR)/jsonnetfmt
11-
KUBECONFORM_BIN=$(BIN_DIR)/kubeconform
12-
TOOLING=$(EMBEDMD_BIN) $(JB_BIN) $(GOJSONTOYAML_BIN) $(JSONNET_BIN) $(JSONNETLINT_BIN) $(JSONNETFMT_BIN) $(KUBECONFORM_BIN)
9+
TOOLING=$(JB_BIN) $(JSONNET_BIN) $(JSONNETLINT_BIN) $(JSONNETFMT_BIN)
1310

1411
JSONNETFMT_ARGS=-n 2 --max-blank-lines 2 --string-style s --comment-style s
1512

16-
KUBE_VERSION?="1.20.0"
17-
18-
all: lint fmt generate
13+
all: lint fmt
1914

2015
.PHONY: clean
2116
clean:
2217
# Remove all files and directories ignored by git.
2318
git clean -Xfd .
2419

25-
vendor: $(JB_BIN) jsonnetfile.json jsonnetfile.lock.json
26-
rm -rf vendor
27-
$(JB_BIN) install
28-
2920
.PHONY: fmt
3021
fmt: $(JSONNETFMT_BIN)
31-
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
22+
find . -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
3223
xargs -n 1 -- $(JSONNETFMT_BIN) $(JSONNETFMT_ARGS) -i
3324

3425
.PHONY: lint
35-
lint: $(JSONNETLINT_BIN) vendor
36-
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
37-
xargs -n 1 -- $(JSONNETLINT_BIN) -J vendor
26+
lint: $(JSONNETLINT_BIN)
27+
find . -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
28+
xargs -n 1 -- $(JSONNETLINT_BIN)
3829

3930

4031
$(BIN_DIR):

jsonnet/buildscripts/go.mod

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,17 @@ module _ // go.mod created for tooling dependencies
33
go 1.19
44

55
require (
6-
github.com/brancz/gojsontoyaml v0.1.0
7-
github.com/campoy/embedmd v1.0.0
86
github.com/google/go-jsonnet v0.20.0
97
github.com/jsonnet-bundler/jsonnet-bundler v0.4.0
10-
github.com/yannh/kubeconform v0.6.0
118
)
129

1310
require (
1411
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect
1512
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect
1613
github.com/fatih/color v1.12.0 // indirect
17-
github.com/ghodss/yaml v1.0.0 // indirect
1814
github.com/mattn/go-colorable v0.1.8 // indirect
1915
github.com/mattn/go-isatty v0.0.12 // indirect
2016
github.com/pkg/errors v0.8.0 // indirect
21-
github.com/pmezard/go-difflib v1.0.0 // indirect
22-
github.com/santhosh-tekuri/jsonschema/v5 v5.1.1 // indirect
2317
golang.org/x/sys v0.1.0 // indirect
2418
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
2519
gopkg.in/yaml.v2 v2.4.0 // indirect

jsonnet/buildscripts/go.sum

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,13 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5Vpd
22
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
33
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
44
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
5-
github.com/brancz/gojsontoyaml v0.1.0 h1:SdzR3+BCVOqaI42nFGTeaB7/2DgDM4fhuvRLqxatA8M=
6-
github.com/brancz/gojsontoyaml v0.1.0/go.mod h1:+ycZY94+V11XZBUaDEsbLr3hPNS/ZPrDVKKNUg3Sgvg=
7-
github.com/campoy/embedmd v1.0.0 h1:V4kI2qTJJLf4J29RzI/MAt2c3Bl4dQSYPuflzwFH2hY=
85
github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8=
96
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
107
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
118
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
129
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
1310
github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc=
1411
github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
15-
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
16-
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
1712
github.com/google/go-jsonnet v0.20.0 h1:WG4TTSARuV7bSm4PMB4ohjxe33IHT5WVTrJSU33uT4g=
1813
github.com/google/go-jsonnet v0.20.0/go.mod h1:VbgWF9JX7ztlv770x/TolZNGGFfiHEVx9G6ca2eUmeA=
1914
github.com/jsonnet-bundler/jsonnet-bundler v0.4.0 h1:4BKZ6LDqPc2wJDmaKnmYD/vDjUptJtnUpai802MibFc=
@@ -28,14 +23,10 @@ github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
2823
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
2924
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
3025
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
31-
github.com/santhosh-tekuri/jsonschema/v5 v5.1.1 h1:lEOLY2vyGIqKWUI9nzsOJRV3mb3WC9dXYORsLEUcoeY=
32-
github.com/santhosh-tekuri/jsonschema/v5 v5.1.1/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0=
3326
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
3427
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
3528
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
3629
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
37-
github.com/yannh/kubeconform v0.6.0 h1:4Figo6t2OF8yNkC+cqa8qy20jcYY0LsJF0+p2klZZiU=
38-
github.com/yannh/kubeconform v0.6.0/go.mod h1:4E6oaL+lh7KgCG2SaOabeeAFBkyKu5D9ab0OEekGcbs=
3930
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
4031
golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
4132
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

jsonnet/buildscripts/tools.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
package tools
66

77
import (
8-
_ "github.com/brancz/gojsontoyaml"
9-
_ "github.com/campoy/embedmd"
108
_ "github.com/google/go-jsonnet/cmd/jsonnet"
119
_ "github.com/google/go-jsonnet/cmd/jsonnet-lint"
1210
_ "github.com/google/go-jsonnet/cmd/jsonnetfmt"
1311
_ "github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb"
14-
_ "github.com/yannh/kubeconform/cmd/kubeconform"
1512
)

jsonnet/jsonnetfile.json

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

jsonnet/jsonnetfile.lock.json

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

nix/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Overview
2+
3+
These are a collection of packages we need, or packages where we
4+
want to control the exact version(s) of.
5+
6+
The packages are imported through the `nix-shell` automatically.
7+
8+
## nix-shell
9+
10+
Build environment including all test and debug dependencies.
11+
It can be run with two arguments:
12+
13+
* `--arg norust true`: to use your own rust toolchain.
14+
* `--arg devrustup true`: to use rustup.

0 commit comments

Comments
 (0)