Skip to content
This repository has been archived by the owner on Jan 7, 2021. It is now read-only.

GitHub ci & automatic insecure installation #6

Merged
merged 7 commits into from Jan 6, 2021
Merged

GitHub ci & automatic insecure installation #6

merged 7 commits into from Jan 6, 2021

Conversation

shokohsc
Copy link
Contributor

@shokohsc shokohsc commented Sep 27, 2020

Hello,
I added GitHub Actions ci steps to test this chart.

I couldn't test it because of the manual steps so I added jobs & a PVC to handle manual steps artifacts creation.
I couldn't test it either because chart-testing for some reason cannot handle files in a root directory so I moved the chart in charts/k8s-ovpn-chart. This modification could turn this repository in a suda/charts repository where you could host other charts.
I want to keep the original way still relevant because of the security obviously. Could you tell me if I missed something
?
extraOptions not yet ready, but not yet necessary ? Edit: fixed in 16e4f9a

I hope it is clear enough that the automatic way is insecure because of the passwordless CA key, though I need help to find a way to provide a password from maybe an environment variable to the job oven_initpki Job, I know this is possible for some binaries to handle such behavior but couldn't make it work like this:
$ echo 'some_password' | docker run --net=none --rm -it -v ${PWD}/ovpn0:/etc/openvpn kylemanna/openvpn:${APP_VERSION} ovpn_initpki -

Adding a CI is mostly a first step towards a fully automatic & secure way of installing this chart, creating client ovpn files (with password as arguments) via a sidecar container in the deployment serving an http api to handle crud operations on client ovpn files...

Maybe @kylemanna could provide some input (can't seem to be able to notify from here), Edit: (seems to work).

Copy link
Owner

@suda suda left a comment

Choose a reason for hiding this comment

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

Wow Dimitri, this is awesome! Thank you so much! I left a couple of comments. Also, I saw you removed the ability to specify the namespace for this chart, what's the reason for this?

charts/k8s-ovpn-chart/.helmignore Show resolved Hide resolved
charts/k8s-ovpn-chart/templates/deployment.yaml Outdated Show resolved Hide resolved
charts/k8s-ovpn-chart/templates/network-policy.yaml Outdated Show resolved Hide resolved
@shokohsc
Copy link
Contributor Author

shokohsc commented Nov 5, 2020

Hello,

As I understood how it happened on my side and in github action chart testing, a namespace is created for each release BUT it may be a flag used for the helm command inside the github action only ! So yeah, it will be wiser to revert this change.

As of the ovpn0 entry in .helmignore, chart isn't in the root directory so it should not be added to it.

I pushed this chart a little bit further (automatic secured CA & ovpn binaries tasks such as create/read/delete clients) https://github.com/shokohsc/charts/tree/main/charts/openvpn-server

@shokohsc
Copy link
Contributor Author

fixed #7 too

@suda
Copy link
Owner

suda commented Jan 6, 2021

Great! I'm going to merge and release this 👍

@suda suda merged commit 75ea37f into suda:master Jan 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants