-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description During resolving conflicts between #407 and #408 this line was not removed, thus creating (and overwriting!) the truststore *after* the ldap tls cert was added. Result was the ldap tls cert missing from the truststore
- Loading branch information
Showing
5 changed files
with
112 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
166 changes: 94 additions & 72 deletions
166
tests/templates/kuttl/ldap-authentication/03-install-openldap.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,99 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
metadata: | ||
name: openldap | ||
labels: | ||
app.kubernetes.io/name: openldap | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: openldap | ||
serviceName: openldap | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: openldap | ||
spec: | ||
containers: | ||
- name: openldap | ||
image: docker.io/bitnami/openldap:2.5 | ||
env: | ||
- name: LDAP_ADMIN_USERNAME | ||
value: admin | ||
- name: LDAP_ADMIN_PASSWORD | ||
value: admin | ||
- name: LDAP_ENABLE_TLS | ||
value: "yes" | ||
- name: LDAP_TLS_CERT_FILE | ||
value: /tls/tls.crt | ||
- name: LDAP_TLS_KEY_FILE | ||
value: /tls/tls.key | ||
- name: LDAP_TLS_CA_FILE | ||
value: /tls/ca.crt | ||
commands: | ||
- script: | | ||
kubectl apply -n $NAMESPACE -f - <<EOF | ||
--- | ||
apiVersion: secrets.stackable.tech/v1alpha1 | ||
kind: SecretClass | ||
metadata: | ||
name: openldap-tls-$NAMESPACE | ||
spec: | ||
backend: | ||
autoTls: | ||
ca: | ||
autoGenerate: true | ||
secret: | ||
name: openldap-tls-ca | ||
namespace: $NAMESPACE | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: openldap | ||
labels: | ||
app.kubernetes.io/name: openldap | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: openldap | ||
serviceName: openldap | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: openldap | ||
spec: | ||
containers: | ||
- name: openldap | ||
image: docker.io/bitnami/openldap:2.5 | ||
env: | ||
- name: LDAP_ADMIN_USERNAME | ||
value: admin | ||
- name: LDAP_ADMIN_PASSWORD | ||
value: admin | ||
- name: LDAP_ENABLE_TLS | ||
value: "yes" | ||
- name: LDAP_TLS_CERT_FILE | ||
value: /tls/tls.crt | ||
- name: LDAP_TLS_KEY_FILE | ||
value: /tls/tls.key | ||
- name: LDAP_TLS_CA_FILE | ||
value: /tls/ca.crt | ||
{% if test_scenario['values']['ldap-no-bind-credentials'] == 'true' %} | ||
- name: LDAP_ALLOW_ANON_BINDING | ||
value: "yes" | ||
- name: LDAP_ALLOW_ANON_BINDING | ||
value: "yes" | ||
{% endif %} | ||
ports: | ||
- name: ldap | ||
containerPort: 1389 | ||
- name: tls-ldap | ||
containerPort: 1636 | ||
volumeMounts: | ||
- name: tls | ||
mountPath: /tls | ||
startupProbe: | ||
tcpSocket: | ||
port: 1389 | ||
readinessProbe: | ||
tcpSocket: | ||
port: 1389 | ||
volumes: | ||
- name: tls | ||
csi: | ||
driver: secrets.stackable.tech | ||
volumeAttributes: | ||
secrets.stackable.tech/class: openldap-tls | ||
secrets.stackable.tech/scope: pod | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: openldap | ||
labels: | ||
app.kubernetes.io/name: openldap | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: ldap | ||
port: 1389 | ||
targetPort: ldap | ||
- name: tls-ldap | ||
port: 1636 | ||
targetPort: tls-ldap | ||
selector: | ||
app.kubernetes.io/name: openldap | ||
ports: | ||
- name: ldap | ||
containerPort: 1389 | ||
- name: tls-ldap | ||
containerPort: 1636 | ||
volumeMounts: | ||
- name: tls | ||
mountPath: /tls | ||
startupProbe: | ||
tcpSocket: | ||
port: 1389 | ||
readinessProbe: | ||
tcpSocket: | ||
port: 1389 | ||
volumes: | ||
- name: tls | ||
csi: | ||
driver: secrets.stackable.tech | ||
volumeAttributes: | ||
secrets.stackable.tech/class: openldap-tls-$NAMESPACE | ||
secrets.stackable.tech/scope: pod | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: openldap | ||
labels: | ||
app.kubernetes.io/name: openldap | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- name: ldap | ||
port: 1389 | ||
targetPort: ldap | ||
- name: tls-ldap | ||
port: 1636 | ||
targetPort: tls-ldap | ||
selector: | ||
app.kubernetes.io/name: openldap | ||
EOF |
23 changes: 0 additions & 23 deletions
23
tests/templates/kuttl/ldap-authentication/03-openldap-secret-class.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 0 additions & 92 deletions
92
tests/templates/kuttl/ldap-authentication/install-openldap.yaml.j2
This file was deleted.
Oops, something went wrong.