Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion consul/consul.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ k {
]) +
container.withPorts(containerPort.new('http-metrics', 9107)),

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

consul_deployment:
deployment.new('consul', $._config.consul_replicas, [
Expand Down
2 changes: 1 addition & 1 deletion etcd-operator/etcd-cluster.libsonnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
local podAntiAffinity = $.apps.v1beta1.deployment.mixin.spec.template.spec.affinity.podAntiAffinity,
local podAntiAffinity = $.apps.v1.deployment.mixin.spec.template.spec.affinity.podAntiAffinity,

etcd_cluster(name, size=3, version='3.3.13', env=[]):: {
apiVersion: 'etcd.database.coreos.com/v1beta2',
Expand Down
2 changes: 1 addition & 1 deletion etcd-operator/operator.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
$.util.resourcesRequests('500m', '200Mi') +
$.util.resourcesLimits('1', '500Mi'),

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

operator_deployment:
deployment.new('etcd-operator', 1, [$.operator_container]) +
Expand Down
18 changes: 9 additions & 9 deletions ksonnet-util/kausal.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ k {
new():: {},
},

container:: $.extensions.v1beta1.deployment.mixin.spec.template.spec.containersType {
container:: $.apps.v1.deployment.mixin.spec.template.spec.containersType {
new(name, image)::
super.new(name, image) +
super.withImagePullPolicy('IfNotPresent'),
Expand Down Expand Up @@ -89,7 +89,7 @@ k {
]),
},

toleration:: $.extensions.v1beta1.deployment.mixin.spec.template.spec.tolerationsType,
toleration:: $.apps.v1.deployment.mixin.spec.template.spec.tolerationsType,

servicePort:: $.core.v1.service.mixin.spec.portsType,
},
Expand Down Expand Up @@ -311,7 +311,7 @@ k {
// a subpath mixin.
configVolumeMount(name, path, volumeMountMixin={})::
local container = $.core.v1.container,
deployment = $.extensions.v1beta1.deployment,
deployment = $.apps.v1.deployment,
volumeMount = $.core.v1.volumeMount,
volume = $.core.v1.volume,
addMount(c) = c + container.withVolumeMountsMixin(
Expand All @@ -331,7 +331,7 @@ k {
local name = configMap.metadata.name,
hash = std.md5(std.toString(configMap)),
container = $.core.v1.container,
deployment = $.extensions.v1beta1.deployment,
deployment = $.apps.v1.deployment,
volumeMount = $.core.v1.volumeMount,
volume = $.core.v1.volume,
addMount(c) = c + container.withVolumeMountsMixin(
Expand All @@ -349,7 +349,7 @@ k {

hostVolumeMount(name, hostPath, path, readOnly=false, volumeMountMixin={})::
local container = $.core.v1.container,
deployment = $.extensions.v1beta1.deployment,
deployment = $.apps.v1.deployment,
volumeMount = $.core.v1.volumeMount,
volume = $.core.v1.volume,
addMount(c) = c + container.withVolumeMountsMixin(
Expand All @@ -364,7 +364,7 @@ k {

secretVolumeMount(name, path, defaultMode=256, volumeMountMixin={})::
local container = $.core.v1.container,
deployment = $.extensions.v1beta1.deployment,
deployment = $.apps.v1.deployment,
volumeMount = $.core.v1.volumeMount,
volume = $.core.v1.volume,
addMount(c) = c + container.withVolumeMountsMixin(
Expand All @@ -380,7 +380,7 @@ k {

emptyVolumeMount(name, path, volumeMountMixin={}, volumeMixin={})::
local container = $.core.v1.container,
deployment = $.extensions.v1beta1.deployment,
deployment = $.apps.v1.deployment,
volumeMount = $.core.v1.volumeMount,
volume = $.core.v1.volume,
addMount(c) = c + container.withVolumeMountsMixin(
Expand Down Expand Up @@ -420,7 +420,7 @@ k {

antiAffinity:
{
local deployment = $.apps.v1beta1.deployment,
local deployment = $.apps.v1.deployment,
local podAntiAffinity = deployment.mixin.spec.template.spec.affinity.podAntiAffinity,
local name = super.spec.template.metadata.labels.name,

Expand All @@ -434,7 +434,7 @@ k {
// Add a priority to the pods in a deployment (or deployment-like objects
// such as a statefulset) iff _config.enable_pod_priorities is set to true.
podPriority(p):
local deployment = $.apps.v1beta1.deployment;
local deployment = $.apps.v1.deployment;
if $._config.enable_pod_priorities
then deployment.mixin.spec.template.spec.withPriorityClassName(p)
else {},
Expand Down
2 changes: 1 addition & 1 deletion memcached/memcached.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ k {
'--web.listen-address=0.0.0.0:9150',
]),

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

statefulSet:
statefulSet.new(self.name, $._config.memcached_replicas, [
Expand Down
2 changes: 1 addition & 1 deletion oauth2-proxy/oauth2-proxy.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ k {
envFrom.mixin.secretRef.withName('oauth2-proxy'),
),

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

oauth2_proxy_deployment:
deployment.new('oauth2-proxy', 1, [$.oauth2_proxy_container]),
Expand Down
2 changes: 1 addition & 1 deletion prometheus-ksonnet/lib/alertmanager.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
pvc.mixin.spec.withAccessModes('ReadWriteOnce') +
pvc.mixin.spec.resources.withRequests({ storage: '5Gi' }),

local statefulset = $.apps.v1beta1.statefulSet,
local statefulset = $.apps.v1.statefulSet,

// Do not create statefulset in clusters without any alertmanagers.
alertmanager_statefulset: if replicas > 0 then
Expand Down
2 changes: 1 addition & 1 deletion prometheus-ksonnet/lib/grafana.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
]) +
$.util.resourcesRequests('10m', '40Mi'),

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

grafana_deployment:
deployment.new('grafana', 1, [$.grafana_container]) +
Expand Down
2 changes: 1 addition & 1 deletion prometheus-ksonnet/lib/kube-state-metrics.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
$.util.resourcesRequests('50m', '50Mi') +
$.util.resourcesLimits('250m', '150Mi'),

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

kube_state_metrics_deployment:
deployment.new('kube-state-metrics', 1, [
Expand Down
2 changes: 1 addition & 1 deletion prometheus-ksonnet/lib/nginx.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
container.withPorts($.core.v1.containerPort.new('http', 80)) +
$.util.resourcesRequests('50m', '100Mi'),

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

nginx_deployment:
deployment.new('nginx', 1, [$.nginx_container]) +
Expand Down
2 changes: 1 addition & 1 deletion prometheus-ksonnet/lib/node-exporter.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$.util.resourcesRequests('50m', '30Mi') +
$.util.resourcesLimits('200m', '75Mi'),

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

node_exporter_daemonset:
daemonSet.new('node-exporter', [$.node_exporter_container]) +
Expand Down
2 changes: 1 addition & 1 deletion prometheus-ksonnet/lib/prometheus.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
pvc.mixin.spec.withAccessModes('ReadWriteOnce') +
pvc.mixin.spec.resources.withRequests({ storage: '300Gi' }),

local statefulset = $.apps.v1beta1.statefulSet,
local statefulset = $.apps.v1.statefulSet,
local volumeMount = $.core.v1.volumeMount,

prometheus_statefulset:
Expand Down