Skip to content

Commit

Permalink
Merge pull request #55 from tithely/docker-registry
Browse files Browse the repository at this point in the history
[DEVOPS-2206] Update to use service port and support docker registry semver for preexisting LBs
  • Loading branch information
loyal2thesea authored Jul 30, 2024
2 parents ae72067 + 02cb620 commit e099877
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/generic-service/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: generic-service
description: A Helm chart for Kubernetes
version: 1.1.3
version: 1.1.4
dependencies:
- name: memcached
version: 6.6.x
Expand Down
11 changes: 10 additions & 1 deletion charts/generic-service/templates/imagepolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,21 @@ metadata:
name: {{ $.Release.Namespace }}-{{ $value.name }}
namespace: flux-system
spec:
{{- if not (or (empty $value.imagepolicy.repositoryType) (eq $value.imagepolicy.repositoryType "ecr")) }}
filterTags:
extract: $ts
pattern: {{ $value.imagepolicy.pattern }}
{{- end }}
imageRepositoryRef:
name: {{ $.Values.project | replace "_" "-" }}
{{- if and $value.imagepolicy.repositoryType (eq $value.imagepolicy.repositoryType "docker") }}
policy:
semver:
range: {{ $value.imagepolicy.semverRange }}
{{- else }}
policy:
numerical:
order: asc
{{- end -}}
{{- end }}
{{- end }}

4 changes: 2 additions & 2 deletions charts/generic-service/templates/preexisting-lb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
ports:
- name: http
targetPort: {{ $value.port }} # Port that the container listens on
port: {{ $value.port }} # Port that the service listens on
port: {{ $value.servicePort | default 80 }} # Port that the service listens on
selector:
app.kubernetes.io/name: {{ $value.name }}
app.kubernetes.io/component: web
Expand All @@ -29,7 +29,7 @@ metadata:
spec:
serviceRef:
name: {{ $value.name }}-service # route traffic to the created service
port: {{ $value.port }}
port: {{ $value.servicePort | default 80 }}
targetGroupARN: {{ $value.loadBalancer.targetGroupARN }}
networking:
ingress:
Expand Down

0 comments on commit e099877

Please sign in to comment.