Compare commits
8 Commits
e3f0f89d93
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
20b058b221
|
|||
|
5a2926b76f
|
|||
|
0de7c36592
|
|||
|
0078ae6100
|
|||
|
b005873532
|
|||
|
2a02e168a0
|
|||
|
0397588c8c
|
|||
|
cfbbac3e0b
|
@@ -10,7 +10,6 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
uses: infra/workflows/.gitea/workflows/docker.yaml@956337b9bd5e72a93d3a57513cd421e7554dd61d
|
||||
|
||||
secrets: inherit
|
||||
with:
|
||||
webhook_url: ${{ secrets.WEBHOOK_URL }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM rust:1.92 AS base
|
||||
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
||||
RUN cargo install cargo-chef --locked --version 0.1.71 && \
|
||||
cargo install cargo-auditable --locked --version 0.6.6
|
||||
RUN cargo install cargo-chef --locked --version 0.1.73 && \
|
||||
cargo install cargo-auditable --locked --version 0.7.2
|
||||
WORKDIR /app
|
||||
|
||||
FROM base AS planner
|
||||
|
||||
@@ -6,9 +6,23 @@ group "default" {
|
||||
}
|
||||
|
||||
target "docker-metadata-action" {}
|
||||
target "cache" {
|
||||
cache-from = [
|
||||
{
|
||||
type = "gha",
|
||||
}
|
||||
]
|
||||
|
||||
cache-to = [
|
||||
{
|
||||
type = "gha",
|
||||
mode = "max"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
target "lldap-controller" {
|
||||
inherits = ["docker-metadata-action"]
|
||||
inherits = ["docker-metadata-action", "cache"]
|
||||
context = "./"
|
||||
dockerfile = "Dockerfile"
|
||||
tags = [for tag in target.docker-metadata-action.tags : "${TAG_BASE}:${tag}"]
|
||||
@@ -16,6 +30,7 @@ target "lldap-controller" {
|
||||
}
|
||||
|
||||
target "manifests" {
|
||||
inherits = ["cache"]
|
||||
context = "./"
|
||||
dockerfile = "Dockerfile"
|
||||
target = "manifests"
|
||||
|
||||
@@ -2,9 +2,11 @@ kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: lldap-controller
|
||||
namespace: lldap
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: lldap-controller
|
||||
namespace: lldap
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: lldap-controller
|
||||
|
||||
@@ -2,6 +2,7 @@ kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: lldap-controller
|
||||
namespace: lldap
|
||||
rules:
|
||||
- apiGroups:
|
||||
- lldap.huizinga.dev
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: lldap-controller
|
||||
namespace: lldap
|
||||
labels:
|
||||
app: lldap-controller
|
||||
app.kubernetes.io/name: lldap-controller
|
||||
@@ -18,12 +19,17 @@ spec:
|
||||
kubectl.kubernetes.io/default-container: lldap-controller
|
||||
spec:
|
||||
serviceAccountName: lldap-controller
|
||||
securityContext: {}
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
fsGroup: 1000
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: lldap-controller
|
||||
image: '{{ index .images "lldap-controller" }}'
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext: {}
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
@@ -43,9 +49,15 @@ spec:
|
||||
- name: LLDAP_USERNAME
|
||||
value: admin
|
||||
- name: LLDAP_PASSWORD_FILE
|
||||
value: /secrets/credentials/lldap-ldap-user-pass
|
||||
value: /secrets/credentials/admin-pass
|
||||
- name: LLDAP_BIND_DN
|
||||
value: uid={username},ou=people,dc=huizinga,dc=dev
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsNonRoot: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
volumes:
|
||||
- name: credentials
|
||||
secret:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: lldap
|
||||
resources:
|
||||
- ./crds.yaml
|
||||
- ./service-account.yaml
|
||||
- ./cluster-role.yaml
|
||||
- ./cluster-role-binding.yaml
|
||||
- ./deployment.yaml
|
||||
- namespace.yaml
|
||||
- crds.yaml
|
||||
- service-account.yaml
|
||||
- cluster-role.yaml
|
||||
- cluster-role-binding.yaml
|
||||
- deployment.yaml
|
||||
|
||||
4
manifests/namespace.yaml
Normal file
4
manifests/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: lldap
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: lldap-controller
|
||||
namespace: lldap
|
||||
labels:
|
||||
app: lldap-controller
|
||||
app.kubernetes.io/name: lldap-controller
|
||||
|
||||
Reference in New Issue
Block a user