aboutsummaryrefslogtreecommitdiff
path: root/deploy/vendor/github.com/grafana/jsonnet-libs/ksonnet-util/legacy-noname.libsonnet
blob: 388a10b98ed0f9a35937d0c0521ebf5680511fd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// legacy-noname.libsonnet provides two-way compatibility, in k8s-alpha many new() functions have a mandatory name
// argument while they are absent in ksonnet-lib. `noNewEmptyNameMixin` allows us to make the argument optional in
// either situation.
function(noNewEmptyNameMixin) {
  core+: { v1+: {
    persistentVolumeClaim+: noNewEmptyNameMixin,
  } },
  extensions+: {
    v1beta1+: {
      ingress+: noNewEmptyNameMixin,
    },
  },
  networking+: {
    v1beta1+: {
      ingress+: noNewEmptyNameMixin,
    },
  },
  batch+: {
    v1+: {
      job+: noNewEmptyNameMixin,
    },
    v1beta1+: {
      job+: noNewEmptyNameMixin,
    },
  },
  local rbacPatch = {
    role+: noNewEmptyNameMixin,
    clusterRole+: noNewEmptyNameMixin,
    roleBinding+: noNewEmptyNameMixin,
    clusterRoleBinding+: noNewEmptyNameMixin,
  },
  rbac+: {
    v1+: rbacPatch,
    v1beta1+: rbacPatch,
  },
  policy+: { v1beta1+: {
    podDisruptionBudget+: noNewEmptyNameMixin,
    podSecurityPolicy+: noNewEmptyNameMixin,
  } },
  storage+: { v1+: {
    storageClass+: noNewEmptyNameMixin,
  } },

  scheduling+: { v1beta1+: {
    priorityClass+: noNewEmptyNameMixin,
  } },
  admissionregistration+: { v1beta1+: {
    mutatingWebhookConfiguration+: noNewEmptyNameMixin,
    validatingWebhookConfiguration+: noNewEmptyNameMixin,
  } },
}