initial acm config

This commit is contained in:
2025-05-19 11:18:25 -05:00
parent caea2573e8
commit 631aa6f626
486 changed files with 106 additions and 11791 deletions

View File

@@ -0,0 +1,6 @@
apiVersion: v2
description: A Helm chart to build and deploy a use of remote configuration enabled by ACM and Vault
keywords:
- pattern
name: config-demo
version: 0.0.1

View File

@@ -0,0 +1,24 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: config-demo-configmap
labels:
app.kubernetes.io/instance: config-demo
data:
"index.html": |-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Config Demo</title>
</head>
<body>
<h1>
Hub Cluster domain is '{{ .Values.global.hubClusterDomain }}' <br>
Pod is running on Local Cluster Domain '{{ .Values.global.localClusterDomain }}' <br>
</h1>
<h2>
The secret is <a href="/secret/secret">secret</a>
</h2>
</body>
</html>

View File

@@ -0,0 +1,65 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
application: config-demo
name: config-demo
spec:
replicas: 2
revisionHistoryLimit: 3
selector:
matchLabels:
deploymentconfig: config-demo
template:
metadata:
creationTimestamp: null
labels:
app: config-demo
deploymentconfig: config-demo
name: config-demo
spec:
containers:
- name: apache
image: registry.access.redhat.com/ubi8/httpd-24:1-226
#imagePullPolicy: Always
ports:
- containerPort: 8080
name: http
protocol: TCP
volumeMounts:
- mountPath: /var/www/html
name: config-demo-configmap
- mountPath: /var/www/html/secret
readOnly: true
name: config-demo-secret
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
livenessProbe:
httpGet:
path: /index.html
port: 8080
scheme: HTTP
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /index.html
port: 8080
scheme: HTTP
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
volumes:
- name: config-demo-configmap
configMap:
defaultMode: 438
name: config-demo-configmap
- name: config-demo-secret
secret:
secretName: config-demo-secret

View File

@@ -0,0 +1,18 @@
---
apiVersion: "external-secrets.io/v1beta1"
kind: ExternalSecret
metadata:
name: config-demo-secret
namespace: config-demo
spec:
refreshInterval: 15s
secretStoreRef:
name: {{ .Values.secretStore.name }}
kind: {{ .Values.secretStore.kind }}
target:
name: config-demo-secret
template:
type: Opaque
dataFrom:
- extract:
key: {{ .Values.configdemosecret.key }}

View File

@@ -0,0 +1,12 @@
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: config-demo
spec:
lookupPolicy:
local: true
tags:
- name: registry.access.redhat.com/ubi8/httpd-24
importPolicy: {}
referencePolicy:
type: Local

View File

@@ -0,0 +1,14 @@
apiVersion: route.openshift.io/v1
kind: Route
metadata:
labels:
app: config-demo
name: config-demo
spec:
port:
targetPort: 8080-tcp
to:
kind: Service
name: config-demo
weight: 100
wildcardPolicy: None

View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: config-demo
name: config-demo
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: config-demo
deploymentconfig: config-demo
sessionAffinity: None
type: ClusterIP

View File

@@ -0,0 +1,14 @@
---
secretStore:
name: vault-backend
kind: ClusterSecretStore
configdemosecret:
key: secret/data/global/config-demo
global:
hubClusterDomain: hub.example.com
localClusterDomain: region-one.example.com
clusterGroup:
isHubCluster: true