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

Add server daemonset yaml template files #25

Merged
merged 1 commit into from
Jun 11, 2018
Merged

Conversation

sufuf3
Copy link
Contributor

@sufuf3 sufuf3 commented Jun 7, 2018

  • Add tcp & unix with namespace vortex
  • Fake image name

  • tcp can run
  • unix can run

test files are under ~/go/src/github.com/linkernetworks/network-controller/example/server-yaml

@codecov
Copy link

codecov bot commented Jun 7, 2018

Codecov Report

Merging #25 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #25   +/-   ##
=======================================
  Coverage   86.13%   86.13%           
=======================================
  Files           5        5           
  Lines         137      137           
=======================================
  Hits          118      118           
  Misses         12       12           
  Partials        7        7

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8939b35...d26f4da. Read the comment docs.

Copy link
Contributor

@hwchiu hwchiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the privilege=true for those daemonSet

@sufuf3 sufuf3 changed the title [WIP] Add server daemonset yaml template files Add server daemonset yaml template files Jun 10, 2018
@sufuf3
Copy link
Contributor Author

sufuf3 commented Jun 10, 2018

I added the following config in these yaml files.

        securityContext:
          privileged: true

Could you please help me review this PR, again?
Many thanks.

Copy link
Contributor

@hwchiu hwchiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-sock
- mountPath: /tmp/a.sock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to /var/run/vortex.sock

path: /var/run/docker.sock
- name: grpc-sock
hostPath:
path: /tmp/a.sock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to /var/run/vortex.sock

securityContext:
privileged: true
command: ["./network-controller-server"]
args: ["-unix=/tmp/a.sock"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to /var/run/vortex.sock

metadata:
name: network-controller-server-tcp
namespace: vortex
labels:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this moment. we don't need this label

metadata:
name: network-controller-server-unix
namespace: vortex
labels:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this moment. we don't need this label

@sufuf3
Copy link
Contributor Author

sufuf3 commented Jun 10, 2018

I removed labels. Also, updated the socket name.
Mount path should be folder, so I use /var/run as volumes.hostPath.path & volumeMounts.mountPath.

Please help me review this PR, again.
Thank you very much.

path: /var/run/docker.sock
- name: grpc-sock
hostPath:
path: /var/run/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found mount entire /var/run/ can cause significant security issue. we should change back to /tmp

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unix sockets only live while the program is running, so /tmp/ is usually an alright place for them to live

path: /var/run/docker.sock
- name: grpc-sock
hostPath:
path: /var/run/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unix sockets only live while the program is running, so /tmp/ is usually an alright place for them to live

- Add tcp & unix with namespace vortex
@John-Lin John-Lin merged commit c66eb50 into master Jun 11, 2018
@hwchiu hwchiu deleted the sufuf3/server-yaml-tmp branch June 11, 2018 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants