Skip to content

Commit

Permalink
chore: following the istio naming convention for services (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
42atomys committed Jul 2, 2022
1 parent e66ac66 commit bf47948
Show file tree
Hide file tree
Showing 31 changed files with 87 additions and 51 deletions.
2 changes: 1 addition & 1 deletion deploy/app/api/base/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: api-http
name: http-api
spec:
ports:
- port: 4000
Expand Down
10 changes: 5 additions & 5 deletions deploy/app/api/base/virtual-service.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: api-http
name: http-api
spec:
hosts:
- s42.app
gateways:
- s42-app-live
http:
- name: api-http-gql
- name: http-api-gql
match:
- method:
exact: POST
Expand All @@ -18,10 +18,10 @@ spec:
uri: "/graphql"
route:
- destination:
host: api-http
host: http-api
port:
number: 4000
- name: api-http-gqli
- name: http-api-gqli
match:
- method:
exact: GET
Expand All @@ -31,6 +31,6 @@ spec:
uri: "/"
route:
- destination:
host: api-http
host: http-api
port:
number: 4000
4 changes: 2 additions & 2 deletions deploy/app/api/overlays/live/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ patchesStrategicMerge:
replacements:
- source:
kind: Service
name: api-http
name: http-api
fieldPath: metadata.name
targets:
- select:
kind: VirtualService
name: api-http
name: http-api
fieldPaths:
- spec.http.*.name
- spec.http.*.route.*.destination.host
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/api/overlays/live/use-live-routing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: api-http
name: http-api
spec:
hosts:
- s42.app
Expand Down
4 changes: 2 additions & 2 deletions deploy/app/api/overlays/next/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ patchesStrategicMerge:
replacements:
- source:
kind: Service
name: api-http
name: http-api
fieldPath: metadata.name
targets:
- select:
kind: VirtualService
name: api-http
name: http-api
fieldPaths:
- spec.http.*.name
- spec.http.*.route.*.destination.host
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/api/overlays/next/use-next-routing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: api-http
name: http-api
spec:
hosts:
- next.s42.app
Expand Down
4 changes: 2 additions & 2 deletions deploy/app/api/overlays/sandbox/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ patches:
replacements:
- source:
kind: Service
name: api-http
name: http-api
fieldPath: metadata.name
targets:
- select:
kind: VirtualService
name: api-http
name: http-api
fieldPaths:
- spec.http.*.name
- spec.http.*.route.*.destination.host
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/api/overlays/sandbox/use-sandbox-routing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: api-http
name: http-api
spec:
hosts:
- sandbox.s42.dev
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/config/base/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ data:
# a JWT Token
endpoints:
sets: https://s42.app/.well-known/jwks
sign: prod-jwtks-service-grpc:5000
sign: prod-grpc-jwtks-service:5000
# Certs used to sign and validate the JWT
# Also called : The JWK
jwk:
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/config/overlays/live/use-live.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ data:
# a JWT Token
endpoints:
sets: https://s42.app/.well-known/jwks
sign: prod-jwtks-service-grpc:5000
sign: prod-grpc-jwtks-service:5000
# Certs used to sign and validate the JWT
# Also called : The JWK
jwk:
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/config/overlays/next/use-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ data:
# a JWT Token
endpoints:
sets: https://next.s42.app/.well-known/jwks
sign: next-jwtks-service-grpc:5000
sign: next-grpc-jwtks-service:5000
# Certs used to sign and validate the JWT
# Also called : The JWK
jwk:
Expand Down
4 changes: 2 additions & 2 deletions deploy/app/config/overlays/sandbox/use-sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ data:
# a JWT Token
endpoints:
sets: https://sandbox.s42.dev/.well-known/jwks
sign: sand-jwtks-service-grpc:5000
sign: sand-grpc-jwtks-service:5000
# Certs used to sign and validate the JWT
# Also called : The JWK
jwk:
certPrivateKeyFile: /etc/certs/jwk/private.key
certPublicKeyFile: /etc/certs/jwk/public.pem
# Certs used to secure the GRPC Endpoint with SSL/TLS
grpc:
insecure: false
insecure: true
certRootCaFile: /etc/certs/grpc/ca.crt
certPrivateKeyFile: /etc/certs/grpc/tls.key
certPublicKeyFile: /etc/certs/grpc/tls.crt
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/interface/base/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: interface-http
name: http-interface
spec:
ports:
- port: 3000
Expand Down
6 changes: 3 additions & 3 deletions deploy/app/interface/base/virtual-service.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: interface-http
name: http-interface
spec:
hosts:
- s42.app
gateways:
- s42-app-live
http:
- name: interface-http
- name: http-interface
match:
- uri:
prefix: "/"
route:
- destination:
host: interface-http
host: http-interface
port:
number: 3000
4 changes: 2 additions & 2 deletions deploy/app/interface/overlays/live/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ patchesStrategicMerge:
replacements:
- source:
kind: Service
name: interface-http
name: http-interface
fieldPath: metadata.name
targets:
- select:
kind: VirtualService
name: interface-http
name: http-interface
fieldPaths:
- spec.http.*.name
- spec.http.*.route.*.destination.host
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/interface/overlays/live/use-live-routing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: interface-http
name: http-interface
spec:
hosts:
- s42.app
Expand Down
4 changes: 2 additions & 2 deletions deploy/app/interface/overlays/next/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ patchesStrategicMerge:
replacements:
- source:
kind: Service
name: interface-http
name: http-interface
fieldPath: metadata.name
targets:
- select:
kind: VirtualService
name: interface-http
name: http-interface
fieldPaths:
- spec.http.*.name
- spec.http.*.route.*.destination.host
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/interface/overlays/next/use-next-routing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: interface-http
name: http-interface
spec:
hosts:
- next.s42.app
Expand Down
4 changes: 2 additions & 2 deletions deploy/app/interface/overlays/sandbox/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ patches:
replacements:
- source:
kind: Service
name: interface-http
name: http-interface
fieldPath: metadata.name
targets:
- select:
kind: VirtualService
name: interface-http
name: http-interface
fieldPaths:
- spec.http.*.name
- spec.http.*.route.*.destination.host
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: interface-http
name: http-interface
spec:
hosts:
- sandbox.s42.dev
Expand Down
2 changes: 1 addition & 1 deletion deploy/app/jwtks-service/base/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: jwtks-service
spec:
dnsNames:
- jwtks-service-http
- http-jwtks-service
issuerRef:
kind: ClusterIssuer
name: selfsigned-issuer
Expand Down
4 changes: 2 additions & 2 deletions deploy/app/jwtks-service/base/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: jwtks-service-grpc
name: grpc-jwtks-service
spec:
ports:
- port: 5000
Expand All @@ -10,7 +10,7 @@ spec:
apiVersion: v1
kind: Service
metadata:
name: jwtks-service-http
name: http-jwtks-service
spec:
ports:
- port: 5500
Expand Down
6 changes: 3 additions & 3 deletions deploy/app/jwtks-service/base/virtual-service.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: jwtks-service-http
name: http-jwtks-service
spec:
hosts:
- s42.app
gateways:
- s42-app-live
http:
- name: jwtks-service-http
- name: http-jwtks-service
match:
- method:
exact: GET
Expand All @@ -18,6 +18,6 @@ spec:
uri: "/jwks"
route:
- destination:
host: jwtks-service-http
host: http-jwtks-service
port:
number: 5500
6 changes: 3 additions & 3 deletions deploy/app/jwtks-service/overlays/live/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ patchesStrategicMerge:
replacements:
- source:
kind: Service
name: jwtks-service-grpc
name: grpc-jwtks-service
fieldPath: metadata.name
targets:
- select:
Expand All @@ -25,12 +25,12 @@ replacements:
- spec.dnsNames.0
- source:
kind: Service
name: jwtks-service-http
name: http-jwtks-service
fieldPath: metadata.name
targets:
- select:
kind: VirtualService
name: jwtks-service-http
name: http-jwtks-service
fieldPaths:
- spec.http.*.name
- spec.http.*.route.*.destination.host
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: jwtks-service-http
name: http-jwtks-service
spec:
hosts:
- s42.app
Expand Down
6 changes: 3 additions & 3 deletions deploy/app/jwtks-service/overlays/next/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ patchesStrategicMerge:
replacements:
- source:
kind: Service
name: jwtks-service-grpc
name: grpc-jwtks-service
fieldPath: metadata.name
targets:
- select:
Expand All @@ -25,12 +25,12 @@ replacements:
- spec.dnsNames.0
- source:
kind: Service
name: jwtks-service-http
name: http-jwtks-service
fieldPath: metadata.name
targets:
- select:
kind: VirtualService
name: jwtks-service-http
name: http-jwtks-service
fieldPaths:
- spec.http.*.name
- spec.http.*.route.*.destination.host
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: jwtks-service-http
name: http-jwtks-service
spec:
hosts:
- next.s42.app
Expand Down
Loading

0 comments on commit bf47948

Please sign in to comment.