Open fredsted opened 4 years ago
@fredsted Were you able to find a solution? Could you please share your RBAC file you created, that would be awesome!
Thanks!
Hi @natcohen
I added these to my adaptation of the openvpn chart here:
templates/letsencrypt.role.yaml
{{ if .Values.ui.ssl.enabled }}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: {{ template "fullname_letsencrypt" . }}-role
labels:
app: "{{ .Chart.Name }}"
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
rules:
- apiGroups: ['']
resources: ['secrets']
verbs: ["get", "watch", "list", "create", "update", "patch"]
{{- end }}
templates/letsencrypt.rolebinding.yaml
{{ if .Values.ui.ssl.enabled }}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: {{ template "fullname_letsencrypt" . }}-rolebinding
labels:
app: "{{ .Chart.Name }}"
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "fullname_letsencrypt" . }}-role
subjects:
- kind: ServiceAccount
name: {{ template "fullname_letsencrypt" . }}-sa
{{- end -}}
I wasn't able to find a solution. We initially considered this to allow developers access to a central K8s cluster, but we are now using Teleport for this purpose, which also has an Oauth access flow.
Thank you so much, that is extremely helpful!
@fredsted Sorry to bother but how did you integrate those files into the current project? Do I have to add them into the letsencrypt jobs-pre-install file? If yes, how? Thanks again
@natcohen I basically copied all the files from the chart on this repo and made my own helm chart with the changes :)
@fredsted I did the same but the problem is I don't know where to add these two files into the deployment process... Adding them to the chart doesn't seem to work.
Did you set the value .Values.ui.ssl.enabled
?
yes I did...
I created the two files and added them into the same folder and rebuilt the package. But it seems that it's not deploying the RBAC files on pre-install.
Hi,
I've managed to install the chart and make it work with the latest letsencrypt (had to create RBAC stuff and set the letsencrypt_ca to
https://acme-v02.api.letsencrypt.org/directory
to avoid an "ACME V1" error), but I can't seem to log in in my VPN client.The certificate is created as
simon
even though my github username isfredsted
, not sure if that has anything to do with it.Here's some output from the openvpn pod:
I'm using Google Authenticator for Github, so I've tried several combinations of simon/fredsted and with/without my Google Authenticator code.
I can also see that the link to "Github PAM" does not work, so I can't investigate that part further. https://github.com/cloudposse/github-pam
Is it possible to just delete the password authentication from the VPN? I can make do with the oauth sign-in-to-download-vpn-config part.
@alebabai @osterman