From c18d71df7e9dc82fdbbdd2c10489070bd9dd30cf Mon Sep 17 00:00:00 2001 From: Xiangfeng Zhu Date: Fri, 13 Sep 2024 20:56:29 -0400 Subject: [PATCH 1/2] update hotel --- config/samples/hotel/README.md | 1 - config/samples/hotel/hotel_reservation.yaml | 80 ++++++++++++++++++--- 2 files changed, 72 insertions(+), 9 deletions(-) diff --git a/config/samples/hotel/README.md b/config/samples/hotel/README.md index ea319f6..9ab605a 100644 --- a/config/samples/hotel/README.md +++ b/config/samples/hotel/README.md @@ -1,7 +1,6 @@ ### Preparation ```bash -sed -i 's|||g' config/samples/hotel/hotel_reservation.yaml sed -i 's||'"$(pwd)"'|g' config/samples/hotel/sample_hotel.yaml ``` diff --git a/config/samples/hotel/hotel_reservation.yaml b/config/samples/hotel/hotel_reservation.yaml index 25803a0..ab94bb0 100644 --- a/config/samples/hotel/hotel_reservation.yaml +++ b/config/samples/hotel/hotel_reservation.yaml @@ -1,4 +1,11 @@ apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + account: user + name: hotel-user +--- +apiVersion: v1 kind: Service metadata: annotations: @@ -46,7 +53,8 @@ spec: containers: - command: - ./user - image: xzhu0027/hotelreservation:latest + image: appnetorg/hotelreservation:latest + serviceAccountName: hotel-user imagePullPolicy: Always name: hotel-reserv-user ports: @@ -60,6 +68,13 @@ spec: restartPolicy: Always --- apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + account: search + name: hotel-search +--- +apiVersion: v1 kind: Service metadata: annotations: @@ -107,7 +122,8 @@ spec: containers: - command: - ./search - image: xzhu0027/hotelreservation:latest + image: appnetorg/hotelreservation:latest + serviceAccountName: hotel-search imagePullPolicy: Always name: hotel-reserv-search ports: @@ -122,6 +138,13 @@ spec: status: {} --- apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + account: reservation + name: hotel-reservation +--- +apiVersion: v1 kind: Service metadata: annotations: @@ -169,7 +192,8 @@ spec: containers: - command: - ./reservation - image: xzhu0027/hotelreservation:latest + image: appnetorg/hotelreservation:latest + serviceAccountName: hotel-reservation imagePullPolicy: Always name: hotel-reserv-reservation ports: @@ -184,6 +208,13 @@ spec: status: {} --- apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + account: recommendation + name: hotel-recommendation +--- +apiVersion: v1 kind: Service metadata: annotations: @@ -231,7 +262,8 @@ spec: containers: - command: - ./recommendation - image: xzhu0027/hotelreservation:latest + image: appnetorg/hotelreservation:latest + serviceAccountName: hotel-recommendation imagePullPolicy: Always name: hotel-reserv-recommendation ports: @@ -246,6 +278,13 @@ spec: status: {} --- apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + account: rate + name: hotel-rate +--- +apiVersion: v1 kind: Service metadata: annotations: @@ -293,7 +332,8 @@ spec: containers: - command: - ./rate - image: xzhu0027/hotelreservation:latest + image: appnetorg/hotelreservation:latest + serviceAccountName: hotel-rate imagePullPolicy: Always name: hotel-reserv-rate ports: @@ -308,6 +348,13 @@ spec: status: {} --- apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + account: profile + name: hotel-profile +--- +apiVersion: v1 kind: Service metadata: annotations: @@ -355,7 +402,8 @@ spec: containers: - command: - ./profile - image: xzhu0027/hotelreservation:latest + image: appnetorg/hotelreservation:latest + serviceAccountName: hotel-profile imagePullPolicy: Always name: hotel-reserv-profile ports: @@ -370,6 +418,13 @@ spec: status: {} --- apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + account: geo + name: hotel-geo +--- +apiVersion: v1 kind: Service metadata: annotations: @@ -417,7 +472,8 @@ spec: containers: - command: - ./geo - image: xzhu0027/hotelreservation:latest + image: appnetorg/hotelreservation:latest + serviceAccountName: hotel-geo imagePullPolicy: Always name: hotel-reserv-geo ports: @@ -432,6 +488,13 @@ spec: status: {} --- apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + account: frontend + name: hotel-frontend +--- +apiVersion: v1 kind: Service metadata: annotations: @@ -480,7 +543,8 @@ spec: containers: - command: - ./frontend - image: xzhu0027/hotelreservation:latest + image: appnetorg/hotelreservation:latest + serviceAccountName: hotel-frontend imagePullPolicy: Always name: hotel-reserv-frontend ports: From f2923085fa67601363529fb644d8cb9eafac52ff Mon Sep 17 00:00:00 2001 From: Xiangfeng Zhu Date: Sat, 14 Sep 2024 00:08:03 -0400 Subject: [PATCH 2/2] fix service account indentation --- config/samples/hotel/hotel_reservation.yaml | 16 ++++++++-------- go-lib | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/samples/hotel/hotel_reservation.yaml b/config/samples/hotel/hotel_reservation.yaml index ab94bb0..f524cb8 100644 --- a/config/samples/hotel/hotel_reservation.yaml +++ b/config/samples/hotel/hotel_reservation.yaml @@ -50,11 +50,11 @@ spec: labels: app: user spec: + serviceAccountName: hotel-user containers: - command: - ./user image: appnetorg/hotelreservation:latest - serviceAccountName: hotel-user imagePullPolicy: Always name: hotel-reserv-user ports: @@ -119,11 +119,11 @@ spec: labels: app: search spec: + serviceAccountName: hotel-search containers: - command: - ./search image: appnetorg/hotelreservation:latest - serviceAccountName: hotel-search imagePullPolicy: Always name: hotel-reserv-search ports: @@ -189,11 +189,11 @@ spec: labels: app: reservation spec: + serviceAccountName: hotel-reservation containers: - command: - ./reservation image: appnetorg/hotelreservation:latest - serviceAccountName: hotel-reservation imagePullPolicy: Always name: hotel-reserv-reservation ports: @@ -259,11 +259,11 @@ spec: labels: app: recommendation spec: + serviceAccountName: hotel-recommendation containers: - command: - ./recommendation image: appnetorg/hotelreservation:latest - serviceAccountName: hotel-recommendation imagePullPolicy: Always name: hotel-reserv-recommendation ports: @@ -329,11 +329,11 @@ spec: labels: app: rate spec: + serviceAccountName: hotel-rate containers: - command: - ./rate image: appnetorg/hotelreservation:latest - serviceAccountName: hotel-rate imagePullPolicy: Always name: hotel-reserv-rate ports: @@ -399,11 +399,11 @@ spec: labels: app: profile spec: + serviceAccountName: hotel-profile containers: - command: - ./profile image: appnetorg/hotelreservation:latest - serviceAccountName: hotel-profile imagePullPolicy: Always name: hotel-reserv-profile ports: @@ -469,11 +469,11 @@ spec: labels: app: geo spec: + serviceAccountName: hotel-geo containers: - command: - ./geo image: appnetorg/hotelreservation:latest - serviceAccountName: hotel-geo imagePullPolicy: Always name: hotel-reserv-geo ports: @@ -540,11 +540,11 @@ spec: labels: app: frontend spec: + serviceAccountName: hotel-frontend containers: - command: - ./frontend image: appnetorg/hotelreservation:latest - serviceAccountName: hotel-frontend imagePullPolicy: Always name: hotel-reserv-frontend ports: diff --git a/go-lib b/go-lib index ca9765a..5d74090 160000 --- a/go-lib +++ b/go-lib @@ -1 +1 @@ -Subproject commit ca9765a941d594f612cd258bda4ae8e979193b2f +Subproject commit 5d74090c0546336bc0df1bec536037d864790279