forked from layer5io/image-hub
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: kanishkarj <kanishkarj@hotmail.com>
- Loading branch information
1 parent
86edcf7
commit 9d72c5a
Showing
15 changed files
with
381 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Service to expose web frontend | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: web-service | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: web | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
nodePort: 30007 | ||
--- | ||
# Web frontend | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: web-deployment | ||
labels: | ||
app: web | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: web | ||
template: | ||
metadata: | ||
labels: | ||
app: web | ||
annotations: | ||
"consul.hashicorp.com/connect-inject": "true" | ||
"consul.hashicorp.com/connect-service-upstreams": "api:9091" | ||
"consul.hashicorp.com/connect-service-protocol": "http" | ||
spec: | ||
containers: | ||
- name: web | ||
image: layer5io/dockercon-2020-web:dev | ||
ports: | ||
- containerPort: 8080 | ||
env: | ||
- name: "LISTEN_ADDR" | ||
value: "0.0.0.0:8080" | ||
- name: "UPSTREAM_URIS" | ||
value: "http://localhost:9091" | ||
- name: "NAME" | ||
value: "web" | ||
- name: "MESSAGE" | ||
value: "Hello World" | ||
- name: "HTTP_CLIENT_KEEP_ALIVES" | ||
value: "false" | ||
- name: "TRACING_ZIPKIN" | ||
value: "http://jaeger-collector:9411" | ||
|
||
--- | ||
# API service version 2 | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: api-deployment-v1 | ||
labels: | ||
app: api-v1 | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: api-v1 | ||
template: | ||
metadata: | ||
labels: | ||
app: api-v1 | ||
annotations: | ||
"consul.hashicorp.com/connect-inject": "true" | ||
"consul.hashicorp.com/service-meta-version": "1" | ||
"consul.hashicorp.com/service-tags": "v1" | ||
"consul.hashicorp.com/connect-service-protocol": "http" | ||
"consul.hashicorp.com/connect-wasm-filter-add_header": "/filters/optimized.wasm" | ||
spec: | ||
containers: | ||
- name: api | ||
image: layer5io/dockercon-2020-api:dev | ||
ports: | ||
- containerPort: 8080 | ||
env: | ||
- name: "LISTEN_ADDR" | ||
value: "0.0.0.0:9090" | ||
- name: "NAME" | ||
value: "api-v1" | ||
- name: "MESSAGE" | ||
value: "Response from API v1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
global: | ||
image: nicholasjackson/consul-envoy:dev-dev | ||
imageK8S: nicholasjackson/consul-k8s-dev:latest | ||
|
||
# Available parameters and their default values for the Consul chart. | ||
# Server, when enabled, configures a server cluster to run. This should | ||
# be disabled if you plan on connecting to a Consul cluster external to | ||
# the Kube cluster. | ||
server: | ||
replicas: 1 | ||
bootstrapExpect: 1 # Should <= replicas count | ||
|
||
# storage and storageClass are the settings for configuring stateful | ||
# storage for the server pods. storage should be set to the disk size of | ||
# the attached volume. storageClass is the class of storage which defaults | ||
# to null (the Kube cluster will pick the default). | ||
storage: 64Mi | ||
# storageClass: local-path | ||
|
||
# Client, when enabled, configures Consul clients to run on every node | ||
# within the Kube cluster. The current deployment model follows a traditional | ||
# DC where a single agent is deployed per node. | ||
client: | ||
enabled: true | ||
|
||
# grpc should be set to true if the gRPC listener should be enabled. | ||
# This should be set to true if connectInject or meshGateway is enabled. | ||
grpc: true | ||
|
||
ui: | ||
# True if you want to enable the Consul UI. The UI will run only | ||
# on the server nodes. This makes UI access via the service below (if | ||
# enabled) predictable rather than "any node" if you're running Consul | ||
# clients as well. | ||
enabled: true | ||
|
||
# True if you want to create a Service entry for the Consul UI. | ||
# | ||
# serviceType can be used to control the type of service created. For | ||
# example, setting this to "LoadBalancer" will create an external load | ||
# balancer (for supported K8S installations) to access the UI. | ||
service: | ||
enabled: true | ||
type: 'NodePort' | ||
|
||
# ConnectInject will enable the automatic Connect sidecar injector. | ||
connectInject: | ||
enabled: true | ||
default: false # true will inject by default, otherwise requires annotation | ||
|
||
# Requires Consul v1.5+ and consul-k8s v0.8.1+ | ||
centralConfig: | ||
enabled: "true" | ||
|
||
# defaultProtocol allows you to specify a convenience default protocol if | ||
# most of your services are of the same protocol type. The individual annotation | ||
# on any given pod will override this value. A protocol must be provided, | ||
# either through this setting or individual annotation, for a service to be | ||
# registered correctly. Valid values are "http", "http2", "grpc" and "tcp". | ||
defaultProtocol: "http" | ||
|
||
# Specify a container which has Envoy and any referenced filters | ||
imageEnvoy: "nicholasjackson/example-wasm-filter:dev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.