Skip to content
Open
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
28 changes: 21 additions & 7 deletions kubernetes/open-vsx.org.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ local labels(env) = {
local namespacedResourceMetadata(env) = {
name: "%s-%s" % [ env.appName, env.envName, ],
namespace: env.namespace,
labels: labels(env),
labels: labels(env) {
component: "open-vsx-server",
},
};

local newEnvironment(envName) = {
Expand Down Expand Up @@ -53,11 +55,15 @@ local newDeployment(env, dockerImage) = {
replicas: if (env.envName == "staging") then 1 else 2,
progressDeadlineSeconds: 3600,
selector: {
matchLabels: labels(env),
matchLabels: labels(env) {
component: 'open-vsx-server',
},
},
template: {
metadata: {
labels: labels(env),
labels: labels(env) {
component: 'open-vsx-server',
},
},
spec: {
local thisPod = self,
Expand Down Expand Up @@ -198,7 +204,9 @@ local newDeployment(env, dockerImage) = {
topologyKey: "kubernetes.io/hostname",
whenUnsatisfiable: "DoNotSchedule",
labelSelector: {
matchLabels: labels(env),
matchLabels: labels(env) {
component: 'open-vsx-server',
},
},
},
],
Expand All @@ -212,7 +220,9 @@ local newService(env, deployment) = {
kind: "Service",
metadata: namespacedResourceMetadata(env),
spec: {
selector: labels(env),
selector: labels(env) {
component: 'open-vsx-server',
},
ports: utils.namedObjectList(self._ports),
_ports:: {
http: {
Expand Down Expand Up @@ -257,7 +267,9 @@ local newElasticSearchCluster(env) = {
metadata: {
name: env.elasticsearch.name,
namespace: env.namespace,
labels: labels(env),
labels: labels(env) {
component: 'elasticsearch',
},
},
spec: {
version: "7.9.3",
Expand All @@ -270,7 +282,9 @@ local newElasticSearchCluster(env) = {
},
podTemplate: {
metadata: {
labels: labels(env),
labels: labels(env) {
component: 'elasticsearch',
},
},
spec: {
containers: [
Expand Down