Skip to content

Commit

Permalink
improvement(k8s): update socat image used for registry proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Mar 29, 2020
1 parent 534698d commit ec0c99d
Showing 5 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion garden-service/src/plugins/kubernetes/container/build.ts
Original file line number Diff line number Diff line change
@@ -637,7 +637,7 @@ function isLocalHostname(hostname: string) {
function getSocatContainer(registryHostname: string) {
return {
name: "proxy",
image: "basi/socat:v0.1.0",
image: "gardendev/socat:0.1.0",
command: ["/bin/sh", "-c", `socat TCP-LISTEN:5000,fork TCP:${registryHostname}:5000 || exit 0`],
ports: [
{
Original file line number Diff line number Diff line change
@@ -65,13 +65,11 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
- name: proxy
image: "basi/socat:v0.1.0"
image: "gardendev/socat:0.1.0"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- /bin/sh
- -c
- |
socat TCP-LISTEN:5000,fork TCP:{{ .Values.registry.hostname }}:5000
args:
- TCP-LISTEN:5000,fork
- TCP:{{ .Values.registry.hostname }}:5000
ports:
- name: proxy
containerPort: 5000
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
# Declare variables to be passed into your templates.

image:
repository: basi/socat
tag: v0.1.0
repository: envoyproxy/envoy-alpine
tag: v1.11.0
pullPolicy: IfNotPresent

nameOverride: garden-registry-proxy
5 changes: 5 additions & 0 deletions images/socat/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM alpine:3.11.3

RUN apk add --no-cache socat

ENTRYPOINT ["socat"]
6 changes: 6 additions & 0 deletions images/socat/garden.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Module
type: container
name: socat
description: The socat image, used for proxy sidecars
image: gardendev/socat:0.1.0
dockerfile: Dockerfile

0 comments on commit ec0c99d

Please sign in to comment.