Skip to content

Commit

Permalink
Merge pull request #14 from upbound/feature/e2e-uptest
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanduplessis authored Sep 19, 2023
2 parents 4d00664 + 2b57d0a commit cfe44e6
Show file tree
Hide file tree
Showing 43 changed files with 192 additions and 331 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
# Common versions
GO_VERSION: '1.20'
GO_VERSION: '1.19'
GOLANGCI_VERSION: 'v1.53.3'
DOCKER_BUILDX_VERSION: 'v0.8.2'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jobs:
e2e:
uses: upbound/uptest/.github/workflows/pr-comment-trigger.yml@main
secrets:
UPTEST_CLOUD_CREDENTIALS: ${{ secrets.UPTEST_CLOUD_CREDENTIALS }}
UPTEST_CLOUD_CREDENTIALS: "not used"
UPTEST_DATASOURCE: ${{ secrets.UPTEST_DATASOURCE }}
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ NPROCS ?= 1
# to half the number of CPU cores.
GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 )))

GO_REQUIRED_VERSION ?= 1.20
GOLANGCILINT_VERSION ?= 1.53.3
GO_REQUIRED_VERSION ?= 1.19
GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/generator
GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION)
GO_SUBDIRS += cmd internal apis
Expand All @@ -53,7 +52,6 @@ UP_VERSION = v0.18.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.2.1
RELDIR = "examples/release"
UPTEST_EXAMPLE_LIST=${RELDIR}/mount/mount-generic-secrets.yaml,${RELDIR}/genericsecret/genericsecret.yaml,${RELDIR}/mount/mount-kv-v1.yaml,${RELDIR}/kvsecret/kvsecret.yaml,${RELDIR}/mount/mount-kv-v2.yaml,${RELDIR}/kvsecretv2/kvsecretv2.yaml,${RELDIR}/tokenauthbackendrole/tokenauthbackendrole.yaml,${RELDIR}/token/token.yaml,${RELDIR}/githubauthbackend/githubauthbackend.yaml,${RELDIR}/githubteam/githubteam.yaml
-include build/makelib/k8s_tools.mk

# ====================================================================================
Expand Down
16 changes: 0 additions & 16 deletions cluster/test/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ if [ -f "${KUBECONFIG_PATH}" ]; then
chmod 0600 ${KUBECONFIG_PATH}
fi

echo_info "Creating cloud credential secret..."
${KUBECTL} -n upbound-system create secret generic provider-secret --from-literal=credentials="{\"token\":\"${UPTEST_CLOUD_CREDENTIALS}\"}" --dry-run=client -o yaml | ${KUBECTL} apply -f -
echo_info "Waiting until provider is healthy..."
${KUBECTL} wait provider.pkg --all --for condition=Healthy --timeout 5m

Expand Down Expand Up @@ -123,17 +121,3 @@ spec:
namespace: vault
key: credentials
EOF

echo_info "Enabling GitHub Auth"
${KUBECTL} exec -n vault --stdin vault-0 -- vault login -tls-skip-verify $VAULT_ROOT_TOKEN
${KUBECTL} exec -n vault --stdin vault-0 -- vault auth enable github

echo_info "Enabled Auth Methods"
${KUBECTL} exec -n vault --stdin vault-0 -- vault auth list

# More useful setup info
# https://itnext.io/vault-cluster-with-auto-unseal-on-kubernetes-8e469f9cdcfd

echo_step "Note: local-dev cluster will remain after tests"
echo_step_completed "Test setup complete"
echo_step "Running upjet vault tests"
File renamed without changes.
6 changes: 0 additions & 6 deletions examples/experimental/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions examples/experimental/adsecretbackend/adsecretbackend.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions examples/experimental/adsecretbackend/secret.yaml.tmpl

This file was deleted.

17 changes: 0 additions & 17 deletions examples/experimental/adsecretrole/adsecretrole.yaml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions examples/experimental/audit/audit.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions examples/experimental/auditrequestheader/auditrequestheader.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions examples/experimental/genericendpoint/genericendpoint.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions examples/experimental/githubuser/githubuser-humoflife-2.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions examples/experimental/githubuser/githubuser-humoflife.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions examples/experimental/jwtauthbackend/jwtauthbackend.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions examples/experimental/jwtauthbackendrole/jwtauthbackendrole.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions examples/experimental/raftautopilot/raftautopilot.yaml

This file was deleted.

33 changes: 33 additions & 0 deletions examples/genericsecret/genericsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: generic.vault.upbound.io/v1alpha1
kind: Secret
metadata:
annotations:
meta.upbound.io/example-id: generic/v1alpha1/secret
labels:
testing.upbound.io/example-name: vault-creds
name: vault-creds
spec:
forProvider:
path: "generic/vault-creds"
dataJsonSecretRef:
name: vault-creds
namespace: vault
key: credentials
providerConfigRef:
name: vault-provider-config
---
apiVersion: vault.vault.upbound.io/v1alpha1
kind: Mount
metadata:
annotations:
meta.upbound.io/example-id: generic/v1alpha1/secret
labels:
testing.upbound.io/example-name: vault-creds
name: vault-creds-generic
spec:
deletionPolicy: Delete
forProvider:
path: "generic"
type: "generic"
providerConfigRef:
name: vault-provider-config
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
apiVersion: github.vault.upbound.io/v1alpha1
kind: AuthBackend
metadata:
annotations:
meta.upbound.io/example-id: github/v1alpha1/authbackend
labels:
testing.upbound.io/example-name: github-specific-auth-backend
name: github-specific-auth-backend
spec:
forProvider:
Expand Down
29 changes: 29 additions & 0 deletions examples/githubteam/githubteam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: github.vault.upbound.io/v1alpha1
kind: Team
metadata:
annotations:
meta.upbound.io/example-id: github/v1alpha1/team
labels:
testing.upbound.io/example-name: github-team
name: github-team
spec:
forProvider:
backend: "github"
team: "everyone"
providerConfigRef:
name: vault-provider-config
---
apiVersion: auth.vault.upbound.io/v1alpha1
kind: Backend
metadata:
annotations:
meta.upbound.io/example-id: github/v1alpha1/team
labels:
testing.upbound.io/example-name: github-team
name: github-team
spec:
forProvider:
description: "GitHub generic auth backend for UXP manageed Vault"
type: "github"
providerConfigRef:
name: vault-provider-config
33 changes: 33 additions & 0 deletions examples/kvsecret/kvsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: kv.vault.upbound.io/v1alpha1
kind: Secret
metadata:
annotations:
meta.upbound.io/example-id: kv/v1alpha1/secret
labels:
testing.upbound.io/example-name: vault-creds
name: vault-creds
spec:
forProvider:
path: "kvv1/vault-creds"
dataJsonSecretRef:
name: vault-creds
namespace: vault
key: credentials
providerConfigRef:
name: vault-provider-config
---
apiVersion: vault.vault.upbound.io/v1alpha1
kind: Mount
metadata:
annotations:
meta.upbound.io/example-id: kv/v1alpha1/secret
labels:
testing.upbound.io/example-name: vault-creds
name: vault-creds-kv1
spec:
deletionPolicy: Delete
forProvider:
path: "kvv1"
type: "kv-v1"
providerConfigRef:
name: vault-provider-config
Loading

0 comments on commit cfe44e6

Please sign in to comment.