| |
| |
| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: rapp |
| namespace: rapps |
| labels: |
| run: kpm |
| prodtest: rapp |
| spec: |
| clusterIP: None # Headless service |
| selector: |
| run: rapp |
| |
| --- |
| |
| apiVersion: apps/v1 |
| kind: StatefulSet |
| metadata: |
| name: rapp |
| namespace: rapps |
| labels: |
| run: rapp |
| prodtest: rapp |
| spec: |
| replicas: $NUM_RAPP |
| serviceName: rapp |
| selector: |
| matchLabels: |
| run: rapp |
| template: |
| metadata: |
| labels: |
| run: rapp |
| prodtest: rapp |
| spec: |
| initContainers: |
| - name: init |
| image: alpine:latest |
| imagePullPolicy: IfNotPresent |
| command: ["ash","-c"] |
| args: ["echo $HOSTNAME"] |
| containers: |
| - name: rapp |
| image: $RAPP_IMAGE |
| imagePullPolicy: $LOCAL_IMAGE_PULL_POLICY |
| ports: |
| - name: http |
| containerPort: 80 |
| env: |
| - name: E1 |
| valueFrom: |
| fieldRef: |
| fieldPath: metadata.name |
| - name: KP |
| valueFrom: |
| fieldRef: |
| fieldPath: metadata.name |
| - name: KAFKA_SERVER |
| value: kafka-1.onap:9092 |
| - name: ICS |
| value: informationservice.nonrtric:8083 |
| - name: SELF |
| value: "$(E1).rapp.rapps:80" |
| |