Skip to content

Commit

Permalink
fix(ksonnet): use apps/v1 (#1543)
Browse files Browse the repository at this point in the history
Required for more modern Kubernetes versions. Limits version support of our libs
to Kubernetes 1.9 to latest (1.17).
  • Loading branch information
sh0rez authored Jan 17, 2020
1 parent a5d6bf9 commit f331d2b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion production/ksonnet/loki-canary/loki-canary.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ k + config {
container.envType.fromFieldPath('POD_NAME', 'metadata.name'),
]),

local daemonSet = $.extensions.v1beta1.daemonSet,
local daemonSet = $.apps.v1.daemonSet,

loki_canary_daemonset:
daemonSet.new('loki-canary', [$.loki_canary_container]),
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
'config.yaml': $.util.manifestYaml($._config.loki),
}),

local deployment = $.apps.v1beta1.deployment,
local deployment = $.apps.v1.deployment,

config_hash_mixin::
deployment.mixin.spec.template.metadata.withAnnotationsMixin({
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/distributor.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$.util.resourcesRequests('500m', '100Mi') +
$.util.resourcesLimits('1', '200Mi'),

local deployment = $.apps.v1beta1.deployment,
local deployment = $.apps.v1.deployment,

distributor_deployment:
deployment.new('distributor', 3, [$.distributor_container]) +
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/gateway.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
container.withPorts($.core.v1.containerPort.new('http', 80)) +
$.util.resourcesRequests('50m', '100Mi'),

local deployment = $.apps.v1beta1.deployment,
local deployment = $.apps.v1.deployment,

gateway_deployment:
deployment.new('gateway', 3, [
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/ingester.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$.util.resourcesRequests('1', '5Gi') +
$.util.resourcesLimits('2', '10Gi'),

local deployment = $.apps.v1beta1.deployment,
local deployment = $.apps.v1.deployment,

ingester_deployment:
deployment.new('ingester', 3, [$.ingester_container]) +
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/querier.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
container.mixin.readinessProbe.withInitialDelaySeconds(15) +
container.mixin.readinessProbe.withTimeoutSeconds(1),

local deployment = $.apps.v1beta1.deployment,
local deployment = $.apps.v1.deployment,

querier_deployment:
deployment.new('querier', 3, [$.querier_container]) +
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/query-frontend.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$.util.resourcesLimits(null, '1200Mi') +
$.jaeger_mixin,

local deployment = $.apps.v1beta1.deployment,
local deployment = $.apps.v1.deployment,

query_frontend_deployment:
deployment.new('query-frontend', 2, [$.query_frontend_container]) +
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/loki/table-manager.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$.util.resourcesRequests('100m', '100Mi') +
$.util.resourcesLimits('200m', '200Mi'),

local deployment = $.apps.v1beta1.deployment,
local deployment = $.apps.v1.deployment,

table_manager_deployment:
deployment.new('table-manager', 1, [$.table_manager_container]) +
Expand Down
2 changes: 1 addition & 1 deletion production/ksonnet/promtail/promtail.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ k + config + scrape_config {
container.mixin.securityContext.withPrivileged(true) +
container.mixin.securityContext.withRunAsUser(0),

local daemonSet = $.extensions.v1beta1.daemonSet,
local daemonSet = $.apps.v1.daemonSet,

promtail_daemonset:
daemonSet.new($._config.promtail_pod_name, [$.promtail_container]) +
Expand Down

0 comments on commit f331d2b

Please sign in to comment.