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

Gateway API / Cert-manager Crds #78

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ override.tf.json
*_override.tf
*_override.tf.json

**/.DS_Store
**/*.tfplan

*.qcow2
*.raw

Expand Down
2 changes: 1 addition & 1 deletion k8s/apps/homepage/blog/hugo/http-route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ spec:
value: /
backendRefs:
- name: hugo
port: 80
port: 80
14 changes: 14 additions & 0 deletions k8s/infra/auth/authelia/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: authelia

resources:
- ns.yaml

helmCharts:
- name: authelia
repo: https://charts.authelia.com
releaseName: authelia
namespace: authelia
version: 0.9.5
valuesFile: values.yaml
4 changes: 4 additions & 0 deletions k8s/infra/auth/authelia/ns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: authelia
60 changes: 60 additions & 0 deletions k8s/infra/auth/authelia/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
image:
registry: ghcr.io
repository: authelia/authelia
tag: 4.38.10 # renovate: docker=ghcr.io/authelia/authelia
pullPolicy: IfNotPresent

configMap:
theme: 'dark'

access_control:
# upgrade to 'two_factor' later
default_policy: 'one_factor'
rules:
- domain_regex: '^.*\.stonegarden.dev$'
policy: 'one_factor'

authentication_backend:
ldap:
enabled: true
implementation: 'lldap'
address: 'ldap://lldap.lldap.svc.cluster.local'
base_dn: 'DC=stonegarden,DC=dev'
additional_users_dn: 'OU=people'
# To allow sign in both with username and email, one can use a filter like
# (&(|({username_attribute}={input})({mail_attribute}={input}))(objectClass=person))
users_filter: '(&({username_attribute}={input})(objectClass=person))'
additional_groups_dn: 'OU=groups'
groups_filter: '(member={dn})'
user: 'UID=admin,OU=people,DC=stonegarden,DC=dev'
password:
secret_name: 'lldap-auth'
value: 'password'

# file:
# enabled: true

session:
cookies:
- subdomain: auth
domain: stonegarden.dev

storage:
postgres:
enabled: false
address: 'tcp://postgres.databases.svc.cluster.local:5432'
# Switch to Postgres later
local:
enabled: true

notifier:
filesystem:
enabled: true

secret:
additionalSecrets:
lldap-auth:
items:
- key: 'password'
path: 'authentication.ldap.password.txt'

3 changes: 3 additions & 0 deletions k8s/infra/auth/lldap/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ spec:
- name: web
port: 80
targetPort: web
- name: ldap
port: 389
targetPort: ldap
2 changes: 2 additions & 0 deletions k8s/infra/auth/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ spec:
destinations:
- namespace: 'argocd'
server: '*'
- namespace: 'authelia'
server: '*'
- namespace: 'keycloak'
server: '*'
- namespace: 'lldap'
Expand Down
5 changes: 3 additions & 2 deletions k8s/infra/controllers/cert-manager/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
installCRDs: true

#installCRDs: true
crds:
enabled: true
extraArgs:
- "--enable-gateway-api"

Expand Down
8 changes: 8 additions & 0 deletions tofu/kubernetes/talos/machine-config/control-plane.yaml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ cluster:
name: none
proxy:
disabled: true
#need to install gateway api manifests before cilium deployment. GatewayClass acceptance
extraManifests:
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.1.0/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.1.0/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.1.0/config/crd/standard/gateway.networking.k8s.io_httproutes.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.1.0/config/crd/standard/gateway.networking.k8s.io_referencegrants.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.1.0/config/crd/standard/gateway.networking.k8s.io_grpcroutes.yaml
- https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.1.0/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml
inlineManifests:
- name: cilium-values
contents: |
Expand Down