Skip to content

Commit

Permalink
Merge pull request #61 from nicholasjackson/dev
Browse files Browse the repository at this point in the history
Fix bug when re-configuring release
  • Loading branch information
nicholasjackson committed Apr 30, 2022
2 parents f752c12 + 3ec181f commit 1567568
Show file tree
Hide file tree
Showing 34 changed files with 2,103 additions and 17,582 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ create_dev_env_no_controller_no_app:
create_dev_env_local_controller:
shipyard run ./shipyard/kubernetes --var="helm_controller_enabled=false"

create_dev_env_local_controller_no_app:
shipyard run ./shipyard/kubernetes --var="helm_controller_enabled=false" --var="example_app=false"

# Create a dev environment with Shipyard and install the controller
create_dev_env_docker_controller:
shipyard run ./shipyard/kubernetes --var="controller_version=${VERSION}.dev"
Expand Down
7 changes: 1 addition & 6 deletions deploy/kubernetes/charts/consul-release-controller/Chart.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ version: ##VERSION##
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "##VERSION##"

dependencies:
- name: cert-manager
version: ~1.8.0
repository: https://charts.jetstack.io
appVersion: "##VERSION##"
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,5 @@ version: 0.1.1
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.1"

dependencies:
- name: cert-manager
version: ~1.8.0
repository: https://charts.jetstack.io
appVersion: "0.1.1"
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
annotations:
'consul.hashicorp.com/connect-inject': 'true'
'consul.hashicorp.com/transparent-proxy': 'false'
'consul.hashicorp.com/connect-service-upstreams': "{{ include "consul-release-controller.fullname" . }}-upstreams:80"
'consul.hashicorp.com/connect-service-upstreams': "{{ include "consul-release-controller.fullname" . }}-upstreams:18080"
{{- with .Values.controller.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -80,6 +80,8 @@ spec:
value: /tmp/serving-certs/tls.crt
- name: TLS_KEY
value: /tmp/serving-certs/tls.key
- name: UPSTREAMS
value: "http://localhost:18080"
{{- if eq (toString .Values.autoEncrypt.enabled) "false" }}
{{- toYaml .Values.controller.container_config.hostEnv | nindent 12 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ spec:
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
port: 18080
targetPort: 18080
31 changes: 19 additions & 12 deletions example/kubernetes/web.yaml → example/kubernetes/basic/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
apiVersion: v1
kind: Service
metadata:
name: web
name: api
labels:
app: metrics
spec:
selector:
app: web
app: api
ports:
- name: http
protocol: TCP
Expand All @@ -22,44 +22,44 @@ spec:
apiVersion: v1
kind: ServiceAccount
metadata:
name: web
name: api
automountServiceAccountToken: false

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-deployment
name: api-deployment
labels:
app: web_v1
app: api_v1
spec:
replicas: 2
selector:
matchLabels:
app: web
app: api
template:
metadata:
labels:
app: web
app: api
metrics: enabled
annotations:
consul.hashicorp.com/connect-inject: 'true'
consul.hashicorp.com/connect-service-upstreams: 'api:9091'
consul.hashicorp.com/connect-service-upstreams: 'payments:9091'
#consul.hashicorp.com/transparent-proxy: 'true'
#consul.hashicorp.com/transparent-proxy-overwrite-probes: 'true'
#consul.hashicorp.com/transparent-proxy-exclude-inbound-ports: '9090'
spec:
serviceAccountName: web
serviceAccountName: api
automountServiceAccountToken: true
containers:
- name: web
- name: api
image: nicholasjackson/fake-service:v0.23.1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9090
env:
- name: "NAME"
value: "WEB"
value: "API"
- name: "LISTEN_ADDR"
value: "0.0.0.0:9090"
- name: "UPSTREAM_URIS"
Expand All @@ -81,4 +81,11 @@ spec:
path: /health
port: 9090
periodSeconds: 5
initialDelaySeconds: 5
initialDelaySeconds: 5
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "256Mi"
cpu: "500m"
Loading

0 comments on commit 1567568

Please sign in to comment.