Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
k8s-helmfiles
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
41755af6
authored
2022-03-17 18:02:15 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add istio VirtualService support to registry.
1 parent
8201f94b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
1 deletions
registry/helmfile.yaml
registry/registry.yaml
registry/helmfile.yaml
View file @
41755af
...
...
@@ -11,6 +11,14 @@ environments:
service
:
registry
:
nodePort
:
32123
istioVirtualService
:
enabled
:
true
jsonPatches
:
[]
strategicMergePatches
:
[]
gateways
:
-
default/cluster-local-gateway
vhosts
:
-
registry.local
images
:
debian
:
"
debian:bullseye-20211220"
registry
:
"
registry:2"
...
...
@@ -25,7 +33,6 @@ helmfiles:
redis
:
{{
.Values.images.redis
}}
releases
:
-
name
:
{{
.Values.namePrefix
}}
registry
namespace
:
{{
.Values.namespace
}}
chart
:
.
...
...
@@ -44,10 +51,40 @@ releases:
-
op
:
replace
path
:
/spec/ports/0/nodePort
value
:
{{
.Values.registry.service.registry.nodePort
}}
{{
- if .Values.istioVirtualService.enabled
}}
-
target
:
kind
:
VirtualService
name
:
{{
.Values.namePrefix
}}
registry
namespace
:
{{
.Values.namespace
}}
version
:
v1beta1
group
:
networking.istio.io
patch
:
-
op
:
replace
path
:
/spec/http/0/route/0/destination/host
value
:
{{
.Values.namePrefix
}}
registry
{{
- end
}}
{{
- if not (empty (.Values.registry.jsonPatches))
}}
{{
- .Values.registry.jsonPatches | toYaml | indent 6
}}
{{
- end
}}
strategicMergePatches
:
-
apiVersion
:
networking.istio.io/v1beta1
kind
:
VirtualService
metadata
:
name
:
{{
.Values.namePrefix
}}
registry
namespace
:
{{
.Values.namespace
}}
{{
- if .Values.istioVirtualService.enabled
}}
spec
:
hosts
:
{{
- range $vhost_index
,
$vhost
:
= .Values.istioVirtualService.vhosts
}}
-
{{
$vhost | quote
}}
{{
- end
}}
gateways
:
{{
- range $gateway_index
,
$gateway
:
= .Values.istioVirtualService.gateways
}}
-
{{
$gateway | quote
}}
{{
- end
}}
{{
- else
}}
$patch
:
delete
{{
- end
}}
-
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
...
...
registry/registry.yaml
View file @
41755af
---
apiVersion
:
networking.istio.io/v1beta1
kind
:
VirtualService
metadata
:
name
:
registry
spec
:
hosts
:
-
"
registry.local"
gateways
:
-
default/cluster-local-gateway
http
:
-
route
:
-
destination
:
port
:
number
:
5000
host
:
registry
---
apiVersion
:
v1
kind
:
Service
metadata
:
...
...
Please
register
or
sign in
to post a comment