--- apiVersion: v1 kind: ConfigMap metadata: name: default data: default.yaml: |- management: endpoints: web: exposure: include: ["*"] endpoint: health: show-details: always logging: file: /tmp/${spring.application.name}.log --- apiVersion: v1 kind: ConfigMap metadata: name: clone data: clone.yaml: |- message: welcome clone --- apiVersion: v1 kind: ConfigMap metadata: name: gateway data: gateway.yaml: |- spring: cloud: gateway: discovery: locator: enabled: true url-expression: "'http://'+serviceId+'.router.streama.svc.cluster.local'" --- kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: name: reader rules: - apiGroups: [""] resources: ["routes","pods","pods/log","pods/status","services","services/proxy","configmaps","endpoints","secrets","serviceaccounts","namespaces","namespaces/status","resourcequotas/status","events","bindings","replicationcontrollers","persistentvolumeclaims"] verbs: ["get", "watch", "list"] - apiGroups: ["extensions"] resources: ["ingresses"] verbs: ["get", "watch", "list"] - apiGroups: ["apps"] resources: ["deployments"] verbs: ["get", "watch", "list"] --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: reader roleRef: kind: Role name: reader apiGroup: rbac.authorization.k8s.io subjects: - kind: ServiceAccount name: default apiGroup: "" --- apiVersion: apps/v1 kind: Deployment metadata: name: clone spec: selector: matchLabels: run: clone replicas: 2 template: metadata: labels: run: clone spec: containers: - name: clone image: ashraf1abdelrasool/clone:0.0.1-SNAPSHOT ports: - containerPort: 8080 --- apiVersion: v1 kind: Service metadata: name: clone labels: run: clone spec: ports: - protocol: TCP port: 80 targetPort: 8080 name: http # type: ClusterIP # type: NodePort type: LoadBalancer selector: run: clone --- apiVersion: route.openshift.io/v1 kind: Route metadata: name: clone labels: run: clone spec: to: kind: Service name: clone --- apiVersion: apps/v1 kind: Deployment metadata: name: gateway spec: selector: matchLabels: run: gateway replicas: 1 template: metadata: labels: run: gateway spec: containers: - name: gateway image: ashraf1abdelrasool/gateway:0.0.1-SNAPSHOT ports: - containerPort: 8080 --- apiVersion: v1 kind: Service metadata: name: gateway labels: run: gateway spec: ports: - protocol: TCP port: 80 targetPort: 8080 name: http # type: ClusterIP # type: NodePort type: LoadBalancer selector: run: gateway --- apiVersion: route.openshift.io/v1 kind: Route metadata: name: gateway labels: run: gateway spec: to: kind: Service name: gateway