blob: 5e37e44477fb01ab2a73537e39c993228982e27d [file] [log] [blame]
BjornMagnussonXAb998ed62022-09-21 09:26:21 +02001
2
3apiVersion: v1
4kind: Service
5metadata:
6 name: rapp
7 namespace: rapps
8 labels:
9 run: kpm
10 prodtest: rapp
11spec:
12 clusterIP: None # Headless service
13 selector:
14 run: rapp
15
16---
17
18apiVersion: apps/v1
19kind: StatefulSet
20metadata:
21 name: rapp
22 namespace: rapps
23 labels:
24 run: rapp
25 prodtest: rapp
26spec:
27 replicas: $NUM_RAPP
28 serviceName: rapp
29 selector:
30 matchLabels:
31 run: rapp
32 template:
33 metadata:
34 labels:
35 run: rapp
36 prodtest: rapp
37 spec:
38 initContainers:
39 - name: init
40 image: alpine:latest
41 imagePullPolicy: IfNotPresent
42 command: ["ash","-c"]
43 args: ["echo $HOSTNAME"]
44 containers:
45 - name: rapp
46 image: $RAPP_IMAGE
47 imagePullPolicy: $LOCAL_IMAGE_PULL_POLICY
48 ports:
49 - name: http
50 containerPort: 80
51 env:
52 - name: E1
53 valueFrom:
54 fieldRef:
55 fieldPath: metadata.name
56 - name: KP
57 valueFrom:
58 fieldRef:
59 fieldPath: metadata.name
60 - name: KAFKA_SERVER
61 value: kafka-1.onap:9092
62 - name: ICS
63 value: informationservice.nonrtric:8083
64 - name: SELF
65 value: "$(E1).rapp.rapps:80"
66