Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(uptest): make uptest usable for repo #14

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
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.

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.

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
Loading