Created
December 14, 2022 09:14
-
-
Save jmrobles/1fd4e18a53fa9de5ed81b1265625cda1 to your computer and use it in GitHub Desktop.
Pact Broker K8S ConfigMap + Secret + Deployment + Service
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
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: pact-broker-cm | |
namespace: pact | |
data: | |
PACT_BROKER_PORT: '9292' | |
PACT_BROKER_LOG_LEVEL: INFO | |
PACT_BROKER_SQL_LOG_LEVEL: DEBUG | |
PACT_BROKER_DATABASE_CONNECT_MAX_TRIES: "5" | |
PACT_BROKER_BASE_URL: "http://localhost:9292 http://pact-broker-svc.pact:9292" | |
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: pact-broker-secret | |
namespace: pact | |
type: Opaque | |
data: | |
# Encode in base64 the database URL string, I.e: postgres://pact:pact@postgres-svc/pact | |
PACT_BROKER_DATABASE_URL: <REPLACE-WITH-YOUR-DB-CONNECTION-STR> | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: pact-broker | |
namespace: pact | |
labels: | |
app: pact-broker | |
spec: | |
selector: | |
matchLabels: | |
app: pact-broker | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: pact-broker | |
spec: | |
containers: | |
- name: pact-broker | |
image: pactfoundation/pact-broker:2.105.0.1 | |
resources: | |
requests: | |
cpu: 100m | |
memory: 100Mi | |
limits: | |
cpu: 500m | |
memory: 512Mi | |
envFrom: | |
- configMapRef: | |
name: pact-broker-cm | |
- secretRef: | |
name: pact-broker-secret | |
ports: | |
- containerPort: 9292 | |
name: pact-broker | |
restartPolicy: Always | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: pact-broker-svc | |
namespace: pact | |
spec: | |
selector: | |
app: pact-broker | |
type: ClusterIP | |
ports: | |
- name: pact-broker-svc | |
protocol: TCP | |
port: 9292 | |
targetPort: 9292 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment