update agnhost guestbook usage for s/slave/replica/

This commit is contained in:
Benjamin Elder 2020-06-13 20:51:37 -07:00
parent 9ce9e2a7aa
commit d65a3b15bf
5 changed files with 18 additions and 18 deletions

View File

@ -1356,11 +1356,11 @@
codename: '[sig-cli] Kubectl client Guestbook application should create and stop codename: '[sig-cli] Kubectl client Guestbook application should create and stop
a working application [Conformance]' a working application [Conformance]'
description: Create Guestbook application that contains an agnhost master server, description: Create Guestbook application that contains an agnhost master server,
2 agnhost slaves, frontend application, frontend service and agnhost master service 2 agnhost replicas, frontend application, frontend service and agnhost master
and agnhost slave service. Using frontend service, the test will write an entry service and agnhost replica service. Using frontend service, the test will write
into the guestbook application which will store the entry into the backend agnhost an entry into the guestbook application which will store the entry into the backend
store. Application flow MUST work as expected and the data written MUST be available agnhost store. Application flow MUST work as expected and the data written MUST
to read. be available to read.
release: v1.9 release: v1.9
file: test/e2e/kubectl/kubectl.go file: test/e2e/kubectl/kubectl.go
- testname: Kubectl, check version v1 - testname: Kubectl, check version v1

View File

@ -343,12 +343,12 @@ var _ = SIGDescribe("Kubectl client", func() {
forEachGBFile := func(run func(s string)) { forEachGBFile := func(run func(s string)) {
guestbookRoot := "test/e2e/testing-manifests/guestbook" guestbookRoot := "test/e2e/testing-manifests/guestbook"
for _, gbAppFile := range []string{ for _, gbAppFile := range []string{
"agnhost-slave-service.yaml", "agnhost-replica-service.yaml",
"agnhost-master-service.yaml", "agnhost-master-service.yaml",
"frontend-service.yaml", "frontend-service.yaml",
"frontend-deployment.yaml.in", "frontend-deployment.yaml.in",
"agnhost-master-deployment.yaml.in", "agnhost-master-deployment.yaml.in",
"agnhost-slave-deployment.yaml.in", "agnhost-replica-deployment.yaml.in",
} { } {
contents := commonutils.SubstituteImageName(string(e2etestfiles.ReadOrDie(filepath.Join(guestbookRoot, gbAppFile)))) contents := commonutils.SubstituteImageName(string(e2etestfiles.ReadOrDie(filepath.Join(guestbookRoot, gbAppFile))))
run(contents) run(contents)
@ -358,7 +358,7 @@ var _ = SIGDescribe("Kubectl client", func() {
/* /*
Release : v1.9 Release : v1.9
Testname: Kubectl, guestbook application Testname: Kubectl, guestbook application
Description: Create Guestbook application that contains an agnhost master server, 2 agnhost slaves, frontend application, frontend service and agnhost master service and agnhost slave service. Using frontend service, the test will write an entry into the guestbook application which will store the entry into the backend agnhost store. Application flow MUST work as expected and the data written MUST be available to read. Description: Create Guestbook application that contains an agnhost master server, 2 agnhost replicas, frontend application, frontend service and agnhost master service and agnhost replica service. Using frontend service, the test will write an entry into the guestbook application which will store the entry into the backend agnhost store. Application flow MUST work as expected and the data written MUST be available to read.
*/ */
framework.ConformanceIt("should create and stop a working application ", func() { framework.ConformanceIt("should create and stop a working application ", func() {
defer forEachGBFile(func(contents string) { defer forEachGBFile(func(contents string) {

View File

@ -1,25 +1,25 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: agnhost-slave name: agnhost-replica
spec: spec:
replicas: 2 replicas: 2
selector: selector:
matchLabels: matchLabels:
app: agnhost app: agnhost
role: slave role: replica
tier: backend tier: backend
template: template:
metadata: metadata:
labels: labels:
app: agnhost app: agnhost
role: slave role: replica
tier: backend tier: backend
spec: spec:
containers: containers:
- name: slave - name: replica
image: {{.AgnhostImage}} image: {{.AgnhostImage}}
args: [ "guestbook", "--slaveof", "agnhost-master", "--http-port", "6379" ] args: [ "guestbook", "--replicaof", "agnhost-master", "--http-port", "6379" ]
resources: resources:
requests: requests:
cpu: 100m cpu: 100m

View File

@ -1,15 +1,15 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: agnhost-slave name: agnhost-replica
labels: labels:
app: agnhost app: agnhost
role: slave role: replica
tier: backend tier: backend
spec: spec:
ports: ports:
- port: 6379 - port: 6379
selector: selector:
app: agnhost app: agnhost
role: slave role: replica
tier: backend tier: backend

View File

@ -212,12 +212,12 @@ sed_expr="s|{{.AgnhostImage}}|us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnho
# create the services. # create the services.
kubectl create -f ${guestbook}/frontend-service.yaml kubectl create -f ${guestbook}/frontend-service.yaml
kubectl create -f ${guestbook}/agnhost-master-service.yaml kubectl create -f ${guestbook}/agnhost-master-service.yaml
kubectl create -f ${guestbook}/agnhost-slave-service.yaml kubectl create -f ${guestbook}/agnhost-replica-service.yaml
# create the deployments. # create the deployments.
cat ${guestbook}/frontend-deployment.yaml.in | sed ${sed_expr} | kubectl create -f - cat ${guestbook}/frontend-deployment.yaml.in | sed ${sed_expr} | kubectl create -f -
cat ${guestbook}/agnhost-master-deployment.yaml.in | sed ${sed_expr} | kubectl create -f - cat ${guestbook}/agnhost-master-deployment.yaml.in | sed ${sed_expr} | kubectl create -f -
cat ${guestbook}/agnhost-slave-deployment.yaml.in | sed ${sed_expr} | kubectl create -f - cat ${guestbook}/agnhost-replica-deployment.yaml.in | sed ${sed_expr} | kubectl create -f -
``` ```