Skip to content

Commit 78fff4b

Browse files
authored
Update jsonnet lockfiles for new location of obs/deployments (#63)
* Update jsonnet lockfiles for new location of obs/deployments * Add vendor directory to gitignore * Fix CI * Update e2e test with new location * Update subdir * Switch to main branch for obs/obs
1 parent 08f589b commit 78fff4b

File tree

265 files changed

+57
-14132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+57
-14132
lines changed

.circleci/config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ jobs:
1010
- run: git diff --exit-code
1111

1212
test:
13-
machine: true
13+
machine:
14+
image: ubuntu-2004:202101-01
1415
steps:
1516
- checkout
17+
- run: make jsonnet-vendor
1618
- run:
1719
name: e2e tests with operator
1820
no_output_timeout: 30m
@@ -26,9 +28,10 @@ jobs:
2628

2729
container-push:
2830
machine:
29-
image: ubuntu-1604:201903-01
31+
image: ubuntu-2004:202101-01
3032
steps:
3133
- checkout
34+
- run: make jsonnet-vendor
3235
- run: |
3336
echo "$DOCKER_PASS" | docker login quay.io --username $DOCKER_USER --password-stdin
3437
make container-push

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/kind
22
/kubectl
33
/tmp/
4-
vendor
4+
jsonnet/vendor

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RUN apk add --update --no-cache git bash
55
WORKDIR /workspace
66
# Copy the jsonnet source
77
COPY . operator/
8-
COPY ./jsonnet/vendor/github.com/observatorium/deployments/components/ components/
8+
COPY ./jsonnet/vendor/github.com/observatorium/observatorium/configuration/components/ components/
99

1010
# Build
1111
WORKDIR /workspace/operator

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jsonnet-update: $(JB)
5656
cd jsonnet; $(JB) update
5757

5858
jsonnet-update-deployments: $(JB)
59-
cd jsonnet; $(JB) update github.com/observatorium/deployments
59+
cd jsonnet; $(JB) update github.com/observatorium/observatorium
6060

6161
JSONNET_SRC = $(shell find . -type f -not -path './*vendor/*' \( -name '*.libsonnet' -o -name '*.jsonnet' \))
6262
JSONNETFMT_CMD := $(JSONNETFMT) -n 2 --max-blank-lines 2 --string-style s --comment-style s

example/main.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,6 @@ local dex = (import 'github.com/observatorium/deployments/components/dex.libsonn
173173
securityContext: {
174174
fsGroup: 65534,
175175
runAsUser: 65534,
176-
}
176+
},
177177
},
178178
}

jsonnet/jsonnetfile.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
{
55
"source": {
66
"git": {
7-
"remote": "https://github.com/observatorium/deployments.git",
8-
"subdir": ""
7+
"remote": "https://github.com/observatorium/observatorium.git",
8+
"subdir": "configuration"
99
}
1010
},
11-
"version": "master"
11+
"version": "main"
1212
}
1313
],
1414
"legacyImports": true

jsonnet/jsonnetfile.lock.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
{
55
"source": {
66
"git": {
7-
"remote": "https://github.com/observatorium/deployments.git",
8-
"subdir": ""
7+
"remote": "https://github.com/observatorium/api.git",
8+
"subdir": "jsonnet/lib"
99
}
1010
},
11-
"version": "00f27529b8943ec3ef4627c4fb514fea46508c79",
12-
"sum": "PJ3Xq7RBx7DjhkwmEJZHxg3swqFMXscwiYvJTP4Nj/Q="
11+
"version": "cbff1da9ba9371516a6254db359ae33545aefdf7",
12+
"sum": "Z86CgnoTybhpdQKWc2ptURmps1d9Qxhec0/IK6v71kY=",
13+
"name": "observatorium-api"
1314
},
1415
{
1516
"source": {
1617
"git": {
1718
"remote": "https://github.com/observatorium/observatorium.git",
18-
"subdir": "jsonnet/lib"
19+
"subdir": "configuration"
1920
}
2021
},
21-
"version": "937be40bc3199cc43ba0bcb2f5c2b8cc5b21cb0f",
22-
"sum": "Z86CgnoTybhpdQKWc2ptURmps1d9Qxhec0/IK6v71kY=",
23-
"name": "observatorium"
22+
"version": "8f5144ea1f8d86bce5e0b5ab7186f2b882f544dd",
23+
"sum": "JJw7XVf0i3iBxjHrs/AgMQCVdNQgT6RlETcgVdSYUuk="
2424
},
2525
{
2626
"source": {
@@ -29,7 +29,7 @@
2929
"subdir": "jsonnet/lib"
3030
}
3131
},
32-
"version": "eb1b3c72615a3667babf6d4cbd091907c1b933f9",
32+
"version": "ee165b6944c6e6c4453ec7497002244d1714c075",
3333
"sum": "YEWIBzg8kVPUvvrED81YCpK+HeDNc3UMaDnEefEh8ME=",
3434
"name": "thanos-receive-controller"
3535
},
@@ -51,8 +51,8 @@
5151
"subdir": "jsonnet/kube-thanos"
5252
}
5353
},
54-
"version": "2ca480f61556c8ded05fe91f66cd33cde8ec968b",
55-
"sum": "gGfheORoXWmXv2Sd+6xrvKmXFTxnXWpunnpLS0JAYJA="
54+
"version": "f53ad9856c6f765989ea76ba8eff8dd1e77186b7",
55+
"sum": "1wMHM/+NvluUAxS5cBW2c6APEKQNQYLYnv1ZCE1R3/A="
5656
}
5757
],
5858
"legacyImports": false

jsonnet/obs-operator.jsonnet

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
local cr = import 'generic-operator/config';
2-
local thanos = (import 'github.com/observatorium/deployments/components/thanos.libsonnet');
3-
local loki = (import 'github.com/observatorium/deployments/components/loki.libsonnet');
4-
local api = (import 'github.com/observatorium/observatorium/jsonnet/lib/observatorium-api.libsonnet');
5-
local obs = (import 'github.com/observatorium/deployments/components/observatorium.libsonnet');
2+
local thanos = (import 'github.com/observatorium/observatorium/configuration/components/thanos.libsonnet');
3+
local loki = (import 'github.com/observatorium/observatorium/configuration/components/loki.libsonnet');
4+
local api = (import 'github.com/observatorium/api/jsonnet/lib/observatorium-api.libsonnet');
5+
local obs = (import 'github.com/observatorium/observatorium/configuration/components/observatorium.libsonnet');
66

77
local operatorObs = obs {
88

@@ -39,11 +39,11 @@ local operatorObs = obs {
3939
securityContext: if std.objectHas(cr.spec, 'securityContext') then cr.spec.securityContext else obs.thanos.storeCache.config.securityContext,
4040
resources+: (
4141
if std.objectHas(cr.spec.store.cache, 'resources') then {
42-
memcached: cr.spec.store.cache.resources
42+
memcached: cr.spec.store.cache.resources,
4343
} else {}
4444
) + (
4545
if std.objectHas(cr.spec.store.cache, 'exporterResources') then {
46-
exporter: cr.spec.store.cache.exporterResources
46+
exporter: cr.spec.store.cache.exporterResources,
4747
} else {}
4848
),
4949
},
@@ -58,18 +58,18 @@ local operatorObs = obs {
5858

5959
queryFrontendCache+:: {
6060
securityContext: if std.objectHas(cr.spec, 'securityContext') then cr.spec.securityContext else obs.thanos.queryFrontendCache.config.securityContext,
61-
}
61+
},
6262
}),
6363

6464
loki:: if std.objectHas(cr.spec, 'loki') then loki(obs.loki.config {
65-
local cfg = self,
66-
name: cr.metadata.name + '-' + cfg.commonLabels['app.kubernetes.io/name'],
67-
namespace: cr.metadata.namespace,
68-
image: if std.objectHas(cr.spec.loki, 'image') then cr.spec.loki.image else obs.loki.config.image,
69-
replicas: if std.objectHas(cr.spec.loki, 'replicas') then cr.spec.loki.replicas else obs.loki.config.replicas,
70-
version: if std.objectHas(cr.spec.loki, 'version') then cr.spec.loki.version else obs.loki.config.version,
71-
objectStorageConfig: if cr.spec.objectStorageConfig.loki != null then cr.spec.objectStorageConfig.loki else obs.loki.config.objectStorageConfig,
72-
}) else {},
65+
local cfg = self,
66+
name: cr.metadata.name + '-' + cfg.commonLabels['app.kubernetes.io/name'],
67+
namespace: cr.metadata.namespace,
68+
image: if std.objectHas(cr.spec.loki, 'image') then cr.spec.loki.image else obs.loki.config.image,
69+
replicas: if std.objectHas(cr.spec.loki, 'replicas') then cr.spec.loki.replicas else obs.loki.config.replicas,
70+
version: if std.objectHas(cr.spec.loki, 'version') then cr.spec.loki.version else obs.loki.config.version,
71+
objectStorageConfig: if cr.spec.objectStorageConfig.loki != null then cr.spec.objectStorageConfig.loki else obs.loki.config.objectStorageConfig,
72+
}) else {},
7373

7474
gubernator:: {},
7575

@@ -144,15 +144,15 @@ local operatorObs = obs {
144144
) + (
145145
if (std.objectHas(obs.config, 'tolerations') && (v.kind == 'StatefulSet' || v.kind == 'Deployment')) then {
146146
template+: {
147-
spec+:{
147+
spec+: {
148148
tolerations: obs.config.tolerations,
149149
},
150150
},
151151
} else {}
152152
) + (
153153
if (std.objectHas(cr.spec.rule, 'reloaderResources') && (v.kind == 'StatefulSet') && v.metadata.name == obs.config.name + '-thanos-rule') then {
154154
template+: {
155-
spec+:{
155+
spec+: {
156156
containers: [
157157
if c.name == 'configmap-reloader' then c {
158158
resources: cr.spec.rule.reloaderResources,

jsonnet/vendor/deployments

Lines changed: 0 additions & 1 deletion
This file was deleted.

jsonnet/vendor/github.com/observatorium/deployments/.bingo/.gitignore

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

0 commit comments

Comments
 (0)