mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
71 lines
No EOL
1.4 KiB
YAML
71 lines
No EOL
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: rest-api
|
|
labels:
|
|
app: rest-api
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: rest-api
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: rest-api
|
|
spec:
|
|
volumes:
|
|
- name: secret-volume
|
|
secret:
|
|
secretName: my-secret
|
|
containers:
|
|
- name: rest-api
|
|
image: localhost:5000/rest-api:latest
|
|
ports:
|
|
- containerPort: 8080
|
|
volumeMounts:
|
|
- name: secret-volume
|
|
readOnly: true
|
|
mountPath: "/etc/secret-volume"
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: rest-api
|
|
spec:
|
|
selector:
|
|
app: rest-api
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8080
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: rest-api
|
|
annotations:
|
|
# proxy settings handled by Traefik
|
|
# labels:
|
|
# app: rest-api
|
|
# app.kubernetes.io/instance: fabricpeer
|
|
# app.kubernetes.io/managed-by: fabric-operator
|
|
# app.kubernetes.io/name: fabric
|
|
# creator: fabric
|
|
# orgname: Org1MSP
|
|
spec:
|
|
ingressClassName: traefik
|
|
rules:
|
|
- host: restapi.localho.st
|
|
http:
|
|
paths:
|
|
- backend:
|
|
service:
|
|
name: rest-api
|
|
port:
|
|
number: 80
|
|
path: /
|
|
pathType: ImplementationSpecific
|
|
tls:
|
|
- hosts:
|
|
- restapi.localho.st |