Skip to content

Commit 1567568

Browse files
Merge pull request #61 from nicholasjackson/dev
Fix bug when re-configuring release
2 parents f752c12 + 3ec181f commit 1567568

34 files changed

+2103
-17582
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ create_dev_env_no_controller_no_app:
6969
create_dev_env_local_controller:
7070
shipyard run ./shipyard/kubernetes --var="helm_controller_enabled=false"
7171

72+
create_dev_env_local_controller_no_app:
73+
shipyard run ./shipyard/kubernetes --var="helm_controller_enabled=false" --var="example_app=false"
74+
7275
# Create a dev environment with Shipyard and install the controller
7376
create_dev_env_docker_controller:
7477
shipyard run ./shipyard/kubernetes --var="controller_version=${VERSION}.dev"

deploy/kubernetes/charts/consul-release-controller/Chart.tpl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,4 @@ version: ##VERSION##
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "##VERSION##"
25-
26-
dependencies:
27-
- name: cert-manager
28-
version: ~1.8.0
29-
repository: https://charts.jetstack.io
24+
appVersion: "##VERSION##"

deploy/kubernetes/charts/consul-release-controller/Chart.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,5 @@ version: 0.1.1
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "0.1.1"
2524

26-
dependencies:
27-
- name: cert-manager
28-
version: ~1.8.0
29-
repository: https://charts.jetstack.io
25+
appVersion: "0.1.1"

deploy/kubernetes/charts/consul-release-controller/templates/controller.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
annotations:
2020
'consul.hashicorp.com/connect-inject': 'true'
2121
'consul.hashicorp.com/transparent-proxy': 'false'
22-
'consul.hashicorp.com/connect-service-upstreams': "{{ include "consul-release-controller.fullname" . }}-upstreams:80"
22+
'consul.hashicorp.com/connect-service-upstreams': "{{ include "consul-release-controller.fullname" . }}-upstreams:18080"
2323
{{- with .Values.controller.podAnnotations }}
2424
{{- toYaml . | nindent 8 }}
2525
{{- end }}
@@ -80,6 +80,8 @@ spec:
8080
value: /tmp/serving-certs/tls.crt
8181
- name: TLS_KEY
8282
value: /tmp/serving-certs/tls.key
83+
- name: UPSTREAMS
84+
value: "http://localhost:18080"
8385
{{- if eq (toString .Values.autoEncrypt.enabled) "false" }}
8486
{{- toYaml .Values.controller.container_config.hostEnv | nindent 12 }}
8587
{{- end }}

deploy/kubernetes/charts/consul-release-controller/templates/controller_upstreams_service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ spec:
1515
ports:
1616
- name: http
1717
protocol: TCP
18-
port: 80
19-
targetPort: 80
18+
port: 18080
19+
targetPort: 18080

example/kubernetes/web.yaml renamed to example/kubernetes/basic/api.yaml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: web
5+
name: api
66
labels:
77
app: metrics
88
spec:
99
selector:
10-
app: web
10+
app: api
1111
ports:
1212
- name: http
1313
protocol: TCP
@@ -22,44 +22,44 @@ spec:
2222
apiVersion: v1
2323
kind: ServiceAccount
2424
metadata:
25-
name: web
25+
name: api
2626
automountServiceAccountToken: false
2727

2828
---
2929
apiVersion: apps/v1
3030
kind: Deployment
3131
metadata:
32-
name: web-deployment
32+
name: api-deployment
3333
labels:
34-
app: web_v1
34+
app: api_v1
3535
spec:
3636
replicas: 2
3737
selector:
3838
matchLabels:
39-
app: web
39+
app: api
4040
template:
4141
metadata:
4242
labels:
43-
app: web
43+
app: api
4444
metrics: enabled
4545
annotations:
4646
consul.hashicorp.com/connect-inject: 'true'
47-
consul.hashicorp.com/connect-service-upstreams: 'api:9091'
47+
consul.hashicorp.com/connect-service-upstreams: 'payments:9091'
4848
#consul.hashicorp.com/transparent-proxy: 'true'
4949
#consul.hashicorp.com/transparent-proxy-overwrite-probes: 'true'
5050
#consul.hashicorp.com/transparent-proxy-exclude-inbound-ports: '9090'
5151
spec:
52-
serviceAccountName: web
52+
serviceAccountName: api
5353
automountServiceAccountToken: true
5454
containers:
55-
- name: web
55+
- name: api
5656
image: nicholasjackson/fake-service:v0.23.1
5757
imagePullPolicy: IfNotPresent
5858
ports:
5959
- containerPort: 9090
6060
env:
6161
- name: "NAME"
62-
value: "WEB"
62+
value: "API"
6363
- name: "LISTEN_ADDR"
6464
value: "0.0.0.0:9090"
6565
- name: "UPSTREAM_URIS"
@@ -81,4 +81,11 @@ spec:
8181
path: /health
8282
port: 9090
8383
periodSeconds: 5
84-
initialDelaySeconds: 5
84+
initialDelaySeconds: 5
85+
resources:
86+
requests:
87+
memory: "128Mi"
88+
cpu: "250m"
89+
limits:
90+
memory: "256Mi"
91+
cpu: "500m"

0 commit comments

Comments
 (0)