Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Duologic committed Feb 3, 2021
1 parent 810430f commit 1ebd316
Show file tree
Hide file tree
Showing 635 changed files with 2,123 additions and 32,457 deletions.
33 changes: 1 addition & 32 deletions environments/default/main.jsonnet
Original file line number Diff line number Diff line change
@@ -1,32 +1 @@
(import 'ksonnet-util/kausal.libsonnet')
{
core+: {
v1+: {
// Extend service
service+: {
new(name, selector={}, ports=[])::
super.new(name, selector, ports)
+ {
dns: std.trace('found dns', '%s.%s.svc.cluster.local' % [self.metadata.name, $._config.namespace]),
},
},
},
},
}
+
{
_config+:: {
namespace: 'test',
},

account:
$.core.v1.serviceAccount.new('a'),

sts:
$.apps.v1.statefulSet.new('name', 1, [], volumeClaims=[], podLabels={})
+ $.util.antiAffinity,

svc: $.util.serviceFor(
self.sts,
),
}
{}
13 changes: 13 additions & 0 deletions environments/default/spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"apiVersion": "tanka.dev/v1alpha1",
"kind": "Environment",
"metadata": {
"name": "environments/default"
},
"spec": {
"apiServer": "",
"namespace": "default",
"resourceDefaults": {},
"expectVersions": {}
}
}
33 changes: 33 additions & 0 deletions environments/loki/main.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
local gateway = import 'loki/gateway.libsonnet';
local loki = import 'loki/loki.libsonnet';
local promtail = import 'promtail/promtail.libsonnet';

loki + promtail + gateway {
_config+:: {
namespace: 'loki',
htpasswd_contents: 'loki:$apr1$H4yGiGNg$ssl5/NymaGFRUvxIV1Nyr.',

// S3 variables remove if not using aws
storage_backend: 's3,dynamodb',
s3_access_key: 'key',
s3_secret_access_key: 'secret access key',
s3_address: 'url',
s3_bucket_name: 'loki-test',
dynamodb_region: 'region',

using_boltdb_shipper: false,

promtail_config+: {
clients: [{
scheme:: 'http',
hostname:: 'gateway.%(namespace)s.svc' % $._config,
username:: 'loki',
password:: 'password',
container_root_path:: '/var/lib/docker',
}],
},

replication_factor: 3,
consul_replicas: 1,
},
}
13 changes: 13 additions & 0 deletions environments/loki/spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"apiVersion": "tanka.dev/v1alpha1",
"kind": "Environment",
"metadata": {
"name": "environments/loki"
},
"spec": {
"apiServer": "",
"namespace": "loki",
"resourceDefaults": {},
"expectVersions": {}
}
}
19 changes: 10 additions & 9 deletions jsonnetfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,38 @@
{
"source": {
"git": {
"remote": "https://github.com/jsonnet-libs/k8s-alpha.git",
"subdir": "1.16"
"remote": "https://github.com/grafana/loki.git",
"subdir": "production/ksonnet/loki"
}
},
"version": "master"
},
{
"source": {
"git": {
"remote": "https://github.com/jsonnet-libs/k8s-alpha.git",
"subdir": "1.17"
"remote": "https://github.com/grafana/loki.git",
"subdir": "production/ksonnet/promtail"
}
},
"version": "master"
},
{
"source": {
"git": {
"remote": "https://github.com/ksonnet/ksonnet-lib.git",
"subdir": "ksonnet.beta.4"
"remote": "https://github.com/jsonnet-libs/k8s-alpha.git",
"subdir": "1.16"
}
},
"version": "master"
},
{
"source": {
"local": {
"directory": ".."
"git": {
"remote": "https://github.com/ksonnet/ksonnet-lib.git",
"subdir": "ksonnet.beta.4"
}
},
"version": ""
"version": "master"
}
],
"legacyImports": true
Expand Down
62 changes: 47 additions & 15 deletions jsonnetfile.lock.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,75 @@
{
"version": 1,
"dependencies": [
{
"source": {
"git": {
"remote": "https://github.com/grafana/jsonnet-libs.git",
"subdir": "consul"
}
},
"version": "98dc5f385e2f1ab99522b92cb5dfaeae5f2b5767",
"sum": "whodWjF2UjlDT6rDiBsxbT+71UGD2J7IKiVxJETrXCA="
},
{
"source": {
"git": {
"remote": "https://github.com/grafana/jsonnet-libs.git",
"subdir": "jaeger-agent-mixin"
}
},
"version": "98dc5f385e2f1ab99522b92cb5dfaeae5f2b5767",
"sum": "DsdBoqgx5kE3zc6fMYnfiGjW2+9Mx2OXFieWm1oFHgY="
},
{
"source": {
"git": {
"remote": "https://github.com/grafana/jsonnet-libs.git",
"subdir": "ksonnet-util"
}
},
"version": "2cef89cb717c8b596443ac5de0415d1ffdb42252",
"version": "98dc5f385e2f1ab99522b92cb5dfaeae5f2b5767",
"sum": "sI6Hgng7yR8fkgHqJ10e3rQagVhpHhumAKqqzbOZUSM="
},
{
"source": {
"git": {
"remote": "https://github.com/jsonnet-libs/k8s-alpha.git",
"subdir": "1.16"
"remote": "https://github.com/grafana/jsonnet-libs.git",
"subdir": "memcached"
}
},
"version": "5e0d0738721f3c190198818ef7f9414dcee9167f",
"sum": "CcH8uKEfizDSOEY7if0hBxcdNTgVM++luNPiZoTkAPA="
"version": "98dc5f385e2f1ab99522b92cb5dfaeae5f2b5767",
"sum": "AIspZ151p0qkxVc9tuoAEYNrkazV6QncWWsIsarK9GE="
},
{
"source": {
"git": {
"remote": "https://github.com/grafana/loki.git",
"subdir": "production/ksonnet/loki"
}
},
"version": "d667dd20f2878c372cef87fcd61f14b0267ff3bd",
"sum": "EWwVsBEUOl0zQknLhTg2XnUtTBTRR0aUJTJEFKqN1U8="
},
{
"source": {
"git": {
"remote": "https://github.com/grafana/loki.git",
"subdir": "production/ksonnet/promtail"
}
},
"version": "d667dd20f2878c372cef87fcd61f14b0267ff3bd",
"sum": "wXyQwaHH/FokTo40dsnDKAIorEk9O4x+utXAGtZlxpM="
},
{
"source": {
"git": {
"remote": "https://github.com/jsonnet-libs/k8s-alpha.git",
"subdir": "1.17"
"subdir": "1.16"
}
},
"version": "5e0d0738721f3c190198818ef7f9414dcee9167f",
"sum": "95Cd44L6xTYrOvLiLth8LOoONXIaHMblKg/0yGqMBic="
"sum": "CcH8uKEfizDSOEY7if0hBxcdNTgVM++luNPiZoTkAPA="
},
{
"source": {
Expand All @@ -40,14 +80,6 @@
},
"version": "0d2f82676817bbf9e4acf6495b2090205f323b9f",
"sum": "ur22hPQq0JAPBxm8hNMcwjumj4MkozDwOKiGZvVMYh4="
},
{
"source": {
"local": {
"directory": ".."
}
},
"version": ""
}
],
"legacyImports": false
Expand Down
2 changes: 1 addition & 1 deletion lib/k.libsonnet
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(import 'github.com/jsonnet-libs/k8s-alpha/1.17/main.libsonnet')
import 'github.com/jsonnet-libs/k8s-alpha/1.16/main.libsonnet'
1 change: 0 additions & 1 deletion vendor/1.17

This file was deleted.

1 change: 1 addition & 0 deletions vendor/consul
65 changes: 65 additions & 0 deletions vendor/github.com/grafana/jsonnet-libs/consul/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1ebd316

Please sign in to comment.