-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
abbba0c
commit cf95bea
Showing
9 changed files
with
171 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
local lib = import '../../../packages/deployment-utils/dist/index.libsonnet'; | ||
local k = import 'github.com/jsonnet-libs/k8s-libsonnet/1.29/main.libsonnet'; | ||
local lib = import "../../../packages/deployment-utils/dist/index.libsonnet"; | ||
local k = import "github.com/jsonnet-libs/k8s-libsonnet/1.29/main.libsonnet"; | ||
|
||
local deployment = lib.deployment.new(std.extVar('name'), std.extVar('image'), std.extVar('secrets'), std.extVar('port'), '8086') | ||
local deployment = lib.deployment.new(std.extVar("name"), std.extVar("image"), std.extVar("secrets"), std.extVar("port"), "8086") | ||
+ lib.deployment.withEnvVars(0, [ | ||
{ name: 'DOCKER_INFLUXDB_INIT_MODE', value: 'setup' }, | ||
{ name: 'DOCKER_INFLUXDB_INIT_USERNAME', value: std.extVar('DOCKER_INFLUXDB_INIT_USERNAME') }, | ||
{ name: 'DOCKER_INFLUXDB_INIT_PASSWORD', value: std.extVar('DOCKER_INFLUXDB_INIT_PASSWORD') }, | ||
{ name: 'DOCKER_INFLUXDB_INIT_ORG', value: std.extVar('DOCKER_INFLUXDB_INIT_ORG') }, | ||
{ name: 'DOCKER_INFLUXDB_INIT_BUCKET', value: std.extVar('DOCKER_INFLUXDB_INIT_BUCKET') }, | ||
{ name: "DOCKER_INFLUXDB_INIT_MODE", value: "setup" }, | ||
{ name: "DOCKER_INFLUXDB_INIT_USERNAME", value: std.extVar("DOCKER_INFLUXDB_INIT_USERNAME") }, | ||
{ name: "DOCKER_INFLUXDB_INIT_PASSWORD", value: std.extVar("DOCKER_INFLUXDB_INIT_PASSWORD") }, | ||
{ name: "DOCKER_INFLUXDB_INIT_ORG", value: std.extVar("DOCKER_INFLUXDB_INIT_ORG") }, | ||
{ name: "DOCKER_INFLUXDB_INIT_BUCKET", value: std.extVar("DOCKER_INFLUXDB_INIT_BUCKET") }, | ||
]) | ||
+ lib.deployment.withPersistentVolume('influxdb-data') | ||
+ lib.deployment.withPersistentVolume('influxdb-config') | ||
+ lib.deployment.withVolumeMount(0, k.core.v1.volumeMount.new('influxdb-data', '/var/lib/influxdb2',)) | ||
+ lib.deployment.withVolumeMount(0, k.core.v1.volumeMount.new('influxdb-config', '/etc/influxdb2',)) | ||
+ lib.deployment.withPersistentVolume("influxdb-data") | ||
+ lib.deployment.withPersistentVolume("influxdb-config") | ||
+ lib.deployment.withVolumeMount(0, k.core.v1.volumeMount.new("influxdb-data", "/var/lib/influxdb2",)) | ||
+ lib.deployment.withVolumeMount(0, k.core.v1.volumeMount.new("influxdb-config", "/etc/influxdb2",)) | ||
; | ||
|
||
local dataVolume = lib.volume.persistentNfsVolume.new('influxdb-data', '150Gi', std.extVar('nfsIp'), std.extVar('nfsUsername'), std.extVar('nfsPassword')) | ||
local dataVolume = lib.volume.persistentNfsVolume.new("influxdb-data", "150Gi", std.extVar("nfsIp")) | ||
; | ||
local configVolume = lib.volume.persistentNfsVolume.new('influxdb-config', '30Gi', std.extVar('nfsIp'), std.extVar('nfsUsername'), std.extVar('nfsPassword')) | ||
local configVolume = lib.volume.persistentNfsVolume.new("influxdb-config", "30Gi", std.extVar("nfsIp")) | ||
; | ||
local telegrafConfigVolume = lib.volume.persistentVolume.new('telegraf-config', '10Gi') | ||
local telegrafConfigVolume = lib.volume.persistentVolume.new("telegraf-config", "10Gi") | ||
; | ||
|
||
dataVolume + configVolume + std.objectValues(deployment) + telegrafConfigVolume |
Oops, something went wrong.