Skip to content

Commit

Permalink
Merge branch 'master' into kip_webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykazakov authored Nov 14, 2023
2 parents 9fdc780 + 6fcc846 commit 678bab5
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 5 deletions.
File renamed without changes.
4 changes: 4 additions & 0 deletions deploy/host-operator/dev/toolchainconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ spec:
memberStatus:
refreshPeriod: "1s"
environment: 'dev'
webhook:
secret:
ref: 'member-operator-secret'
virtualMachineAccessKey: 'vm.access'
4 changes: 4 additions & 0 deletions deploy/host-operator/e2e-tests/toolchainconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ spec:
deploy: true
memberStatus:
refreshPeriod: "1s"
webhook:
secret:
ref: 'member-operator-secret'
virtualMachineAccessKey: 'vm.access'
webConsolePlugin:
deploy: true
environment: 'e2e-tests'
7 changes: 7 additions & 0 deletions deploy/member-operator/dev/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: member-operator-secret
type: Opaque
stringData:
vm.access: ssh-rsa PcHUNFXhysGvTnvORVbR70EVZA test@host-operator
7 changes: 7 additions & 0 deletions deploy/member-operator/e2e-tests/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: member-operator-secret
type: Opaque
stringData:
vm.access: ssh-rsa PcHUNFXhysGvTnvORVbR70EVZA test@host-operator
10 changes: 6 additions & 4 deletions make/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -309,20 +309,22 @@ endif
###########################################################

.PHONY: prepare-projects
prepare-projects: create-host-project create-member1 create-member2 create-appstudio-crds
prepare-projects: create-host-project create-member1 create-member2 create-thirdparty-crds

.PHONY: create-member1
create-member1:
@echo "Preparing namespace for member operator: $(MEMBER_NS)..."
$(MAKE) create-project PROJECT_NAME=${MEMBER_NS}
-oc label ns --overwrite=true ${MEMBER_NS} app=member-operator
oc apply -f deploy/member-operator/${ENVIRONMENT}/ -n ${MEMBER_NS}

.PHONY: create-member2
create-member2:
ifeq ($(SECOND_MEMBER_MODE),true)
@echo "Preparing namespace for second member operator: ${MEMBER_NS_2}..."
$(MAKE) create-project PROJECT_NAME=${MEMBER_NS_2}
-oc label ns --overwrite=true ${MEMBER_NS_2} app=member-operator
oc apply -f deploy/member-operator/${ENVIRONMENT}/ -n ${MEMBER_NS_2}
endif

.PHONY: deploy-host
Expand Down Expand Up @@ -356,9 +358,9 @@ ifneq ($(E2E_TEST_EXECUTION),true)
oc delete pods --namespace ${HOST_NS} -l name=registration-service || true
endif

.PHONY: create-appstudio-crds
create-appstudio-crds:
oc apply -f deploy/member-operator/e2e-tests/
.PHONY: create-thirdparty-crds
create-thirdparty-crds:
oc apply -f deploy/crds/

.PHONY: create-project
create-project:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/parallel/vm_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestCreateVirtualMachine(t *testing.T) {
userData, userDataFound, userDataErr := unstructured.NestedString(volumes[0].(map[string]interface{}), cloudInitType, "userData")
require.NoError(t, userDataErr)
require.True(t, userDataFound, "user data not found")
require.Equal(t, userData, "#cloud-config\nchpasswd:\n expire: false\npassword: abcd-1234-ef56\nssh_authorized_keys:\n- |\n ssh-rsa tmpkey human@machine\nuser: cloud-user\n")
require.Equal(t, userData, "#cloud-config\nchpasswd:\n expire: false\npassword: abcd-1234-ef56\nssh_authorized_keys:\n- |\n ssh-rsa PcHUNFXhysGvTnvORVbR70EVZA test@host-operator\nuser: cloud-user\n")
})
}
})
Expand Down

0 comments on commit 678bab5

Please sign in to comment.