Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP named pipe / socat sidecar kube port forwarding #3518

Merged
merged 3 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
stdin example
  • Loading branch information
jrhizor committed May 21, 2021
commit 8b59490f1edf5d7a3659aaf97b2def0cf8118574
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ public static void main(String[] args) {
.create(0L, 0, Path.of("/tmp"), "np_source:dev", null)
.start();

process.getOutputStream().write(100);
process.getInputStream().read();

// after running this main:
// kubectl port-forward airbyte-worker-0-0-fmave 9000:9000
// socat -d -d -d TCP-LISTEN:9000,bind=127.0.0.1 stdout
Expand Down
13 changes: 13 additions & 0 deletions airbyte-workers/src/main/resources/stdin_stdout_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ spec:
# mountPath: /workspace
- name: airbyte-pipes
mountPath: /pipes
- name: socat
image: alpine/socat:1.7.4.1-r1
command: [ 'sh', '-c', "socat -d -d -d - TCP-L:9001 > /pipes/stdin" ]
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
ports:
- containerPort: 9000
volumeMounts:
- name: airbyte-pipes
mountPath: /pipes
volumes:
# - name: airbyte-volume-workspace
# persistentVolumeClaim:
Expand Down