Browse Source

chore: remove ksonnet example

Signed-off-by: Daniel Helfand <helfand.4@gmail.com>
pull/129/head
Daniel Helfand 3 years ago
parent
commit
a873aad345
  1. 4
      ksonnet-guestbook/.gitignore
  2. 23
      ksonnet-guestbook/app.yaml
  3. 59
      ksonnet-guestbook/components/guestbook-ui.jsonnet
  4. 18
      ksonnet-guestbook/components/params.libsonnet
  5. 4
      ksonnet-guestbook/environments/base.libsonnet
  6. 2
      ksonnet-guestbook/environments/default/globals.libsonnet
  7. 8
      ksonnet-guestbook/environments/default/main.jsonnet
  8. 17
      ksonnet-guestbook/environments/default/params.libsonnet
  9. 2
      ksonnet-guestbook/environments/dev/globals.libsonnet
  10. 8
      ksonnet-guestbook/environments/dev/main.jsonnet
  11. 17
      ksonnet-guestbook/environments/dev/params.libsonnet
  12. 2
      ksonnet-guestbook/environments/prod/globals.libsonnet
  13. 8
      ksonnet-guestbook/environments/prod/main.jsonnet
  14. 17
      ksonnet-guestbook/environments/prod/params.libsonnet

4
ksonnet-guestbook/.gitignore

@ -1,4 +0,0 @@
/lib
/.ksonnet/registries
/app.override.yaml
/.ks_environment

23
ksonnet-guestbook/app.yaml

@ -1,23 +0,0 @@
apiVersion: 0.1.0
environments:
default:
destination:
namespace: default
server: https://kubernetes.default.svc
k8sVersion: v1.10.0
path: default
dev:
destination:
namespace: dev
server: https://kubernetes.default.svc
k8sVersion: v1.10.0
path: dev
prod:
destination:
namespace: prod
server: https://kubernetes.default.svc
k8sVersion: v1.10.0
path: prod
kind: ksonnet.io/app
name: guestbook
version: 0.0.1

59
ksonnet-guestbook/components/guestbook-ui.jsonnet

@ -1,59 +0,0 @@
local env = std.extVar("__ksonnet/environments");
local params = std.extVar("__ksonnet/params").components["guestbook-ui"];
[
{
"apiVersion": "v1",
"kind": "Service",
"metadata": {
"name": params.name
},
"spec": {
"ports": [
{
"port": params.servicePort,
"targetPort": params.containerPort
}
],
"selector": {
"app": params.name
},
"type": params.type
}
},
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": params.name
},
"spec": {
"replicas": params.replicas,
"revisionHistoryLimit": 3,
"selector": {
"matchLabels": {
"app": params.name
},
},
"template": {
"metadata": {
"labels": {
"app": params.name
}
},
"spec": {
"containers": [
{
"image": params.image,
"name": params.name,
"ports": [
{
"containerPort": params.containerPort
}
]
}
]
}
}
}
}
]

18
ksonnet-guestbook/components/params.libsonnet

@ -1,18 +0,0 @@
{
global: {
// User-defined global parameters; accessible to all component and environments, Ex:
// replicas: 4,
},
components: {
// Component-level parameters, defined initially from 'ks prototype use ...'
// Each object below should correspond to a component in the components/ directory
"guestbook-ui": {
containerPort: 80,
image: "gcr.io/heptio-images/ks-guestbook-demo:0.2",
name: "ks-guestbook-ui",
replicas: 1,
servicePort: 80,
type: "LoadBalancer",
},
},
}

4
ksonnet-guestbook/environments/base.libsonnet

@ -1,4 +0,0 @@
local components = std.extVar("__ksonnet/components");
components + {
// Insert user-specified overrides here.
}

2
ksonnet-guestbook/environments/default/globals.libsonnet

@ -1,2 +0,0 @@
{
}

8
ksonnet-guestbook/environments/default/main.jsonnet

@ -1,8 +0,0 @@
local base = import "base.libsonnet";
// uncomment if you reference ksonnet-lib
// local k = import "k.libsonnet";
base + {
// Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n")
// "nginx-deployment"+: k.deployment.mixin.metadata.labels({foo: "bar"})
}

17
ksonnet-guestbook/environments/default/params.libsonnet

@ -1,17 +0,0 @@
local params = std.extVar("__ksonnet/params");
local globals = import "globals.libsonnet";
local envParams = params + {
components +: {
// Insert component parameter overrides here. Ex:
// guestbook +: {
// name: "guestbook-dev",
// replicas: params.global.replicas,
// },
},
};
{
components: {
[x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components)
},
}

2
ksonnet-guestbook/environments/dev/globals.libsonnet

@ -1,2 +0,0 @@
{
}

8
ksonnet-guestbook/environments/dev/main.jsonnet

@ -1,8 +0,0 @@
local base = import "base.libsonnet";
// uncomment if you reference ksonnet-lib
// local k = import "k.libsonnet";
base + {
// Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n")
// "nginx-deployment"+: k.deployment.mixin.metadata.labels({foo: "bar"})
}

17
ksonnet-guestbook/environments/dev/params.libsonnet

@ -1,17 +0,0 @@
local params = std.extVar("__ksonnet/params");
local globals = import "globals.libsonnet";
local envParams = params + {
components +: {
// Insert component parameter overrides here. Ex:
// guestbook +: {
// name: "guestbook-dev",
// replicas: params.global.replicas,
// },
},
};
{
components: {
[x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components)
},
}

2
ksonnet-guestbook/environments/prod/globals.libsonnet

@ -1,2 +0,0 @@
{
}

8
ksonnet-guestbook/environments/prod/main.jsonnet

@ -1,8 +0,0 @@
local base = import "base.libsonnet";
// uncomment if you reference ksonnet-lib
// local k = import "k.libsonnet";
base + {
// Insert user-specified overrides here. For example if a component is named \"nginx-deployment\", you might have something like:\n")
// "nginx-deployment"+: k.deployment.mixin.metadata.labels({foo: "bar"})
}

17
ksonnet-guestbook/environments/prod/params.libsonnet

@ -1,17 +0,0 @@
local params = std.extVar("__ksonnet/params");
local globals = import "globals.libsonnet";
local envParams = params + {
components +: {
// Insert component parameter overrides here. Ex:
// guestbook +: {
// name: "guestbook-dev",
// replicas: params.global.replicas,
// },
},
};
{
components: {
[x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components)
},
}
Loading…
Cancel
Save