-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure all VEBA endpoints have common auth
Closes: #1078 Signed-off-by: William Lam <[email protected]>
- Loading branch information
William Lam
committed
Jul 15, 2023
1 parent
9ba9cdc
commit 8d408de
Showing
13 changed files
with
214 additions
and
5 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
files/configs/ingress/ingress-authserver-extensionservice.yaml
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: projectcontour.io/v1alpha1 | ||
kind: ExtensionService | ||
metadata: | ||
name: htpasswd | ||
namespace: projectcontour-auth | ||
spec: | ||
protocol: h2 | ||
services: | ||
- name: htpasswd | ||
port: 9443 |
125 changes: 125 additions & 0 deletions
125
files/configs/ingress/templates/ingress-authserver-template.yaml
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 |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#@ load("@ytt:overlay", "overlay") | ||
#@ load("@ytt:data", "data") | ||
|
||
#@ load("@ytt:json", "json") | ||
|
||
#@ name = json.decode(data.values.bom)["contour-authserver"]["containers"][0]["name"] | ||
#@ version = json.decode(data.values.bom)["contour-authserver"]["containers"][0]["version"] | ||
#@ image = name + ":" + version | ||
|
||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: selfsigned | ||
spec: | ||
selfSigned: {} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: htpasswd | ||
namespace: projectcontour-auth | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: contour:authserver:htpasswd | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: contour:authserver:htpasswd | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: contour:authserver:htpasswd | ||
subjects: | ||
- kind: ServiceAccount | ||
name: htpasswd | ||
namespace: projectcontour-auth | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: htpasswd | ||
name: htpasswd | ||
namespace: projectcontour-auth | ||
spec: | ||
ports: | ||
- name: auth | ||
port: 9443 | ||
protocol: TCP | ||
targetPort: 9443 | ||
selector: | ||
app.kubernetes.io/name: htpasswd | ||
type: ClusterIP | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: htpasswd | ||
name: htpasswd | ||
namespace: projectcontour-auth | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: htpasswd | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: htpasswd | ||
spec: | ||
containers: | ||
- args: | ||
- htpasswd | ||
- --address=:9443 | ||
- --tls-ca-path=/tls/ca.crt | ||
- --tls-cert-path=/tls/tls.crt | ||
- --tls-key-path=/tls/tls.key | ||
command: | ||
- /contour-authserver | ||
image: #@ image | ||
imagePullPolicy: IfNotPresent | ||
name: htpasswd | ||
ports: | ||
- containerPort: 9443 | ||
name: auth | ||
protocol: TCP | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 90Mi | ||
volumeMounts: | ||
- mountPath: /tls | ||
name: tls | ||
readOnly: true | ||
serviceAccountName: htpasswd | ||
volumes: | ||
- name: tls | ||
secret: | ||
secretName: htpasswd | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: htpasswd | ||
namespace: projectcontour-auth | ||
spec: | ||
dnsNames: | ||
- htpasswd | ||
issuerRef: | ||
kind: ClusterIssuer | ||
name: selfsigned | ||
secretName: htpasswd |
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
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
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
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
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
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
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
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
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
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
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