9ce0956f1a
Add a quick and easy way to run this on top of kubernetes. It isn't production ready but gives people a starting point.
85 lines
1.4 KiB
YAML
85 lines
1.4 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: clairsvc
|
|
labels:
|
|
app: clair
|
|
spec:
|
|
type: NodePort
|
|
ports:
|
|
- port: 6060
|
|
protocol: TCP
|
|
nodePort: 30060
|
|
name: clair-port0
|
|
- port: 6061
|
|
protocol: TCP
|
|
nodePort: 30061
|
|
name: clair-port1
|
|
selector:
|
|
app: clair
|
|
---
|
|
apiVersion: v1
|
|
kind: ReplicationController
|
|
metadata:
|
|
name: clair
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: clair
|
|
spec:
|
|
volumes:
|
|
- name: secret-volume
|
|
secret:
|
|
secretName: clairsecret
|
|
containers:
|
|
- name: clair
|
|
image: quay.io/coreos/clair
|
|
args:
|
|
- "-config"
|
|
- "/config/config.yaml"
|
|
ports:
|
|
- containerPort: 6060
|
|
- containerPort: 6061
|
|
volumeMounts:
|
|
- mountPath: /config
|
|
name: secret-volume
|
|
---
|
|
apiVersion: v1
|
|
kind: ReplicationController
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
name: clair-postgres
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
app: postgres
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
spec:
|
|
containers:
|
|
- image: postgres:latest
|
|
name: postgres
|
|
env:
|
|
- name: POSTGRES_PASSWORD
|
|
value: password
|
|
ports:
|
|
- containerPort: 5432
|
|
name: postgres-port
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
name: postgres
|
|
spec:
|
|
ports:
|
|
- port: 5432
|
|
selector:
|
|
app: postgres
|