aqua

package module
v0.0.0-...-6d46272 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 1

README

How we added/built stand-alone tests for Aqua

  • git clone
  • mkdir/aqua
  • cd aqua/
  • go mod init github.com/aws/aws-k8s-tester/k8s-tester/aqua
  • Create a file to implement the Tester Interface. touch tester.go
  • copy a vend file from another package cp ../vend.sh .
  • Write tests
  • run ./vend.sh
  • run go mod tidy -v

Test/Run singe test stand-alone

go run cmd/k8s-tester-aqua/main.go apply \
    --kubectl-path="/usr/local/bin/kubectl" \
    --kubeconfig-path="/PATHTO/kubeconfig" \
    --log-outputs="aqua.log" \
    --aqua-license="1234567890" \
    --aqua-username="Username" \
    --aqua-password="Password" 

## Delete
go run cmd/k8s-tester-aqua/main.go delete \
    --kubectl-path="/usr/local/bin/kubectl" \
    --kubeconfig-path="/PATHTO/kubeconfig" \
    --log-outputs="aqua.log" \
    --aqua-license="1234567890" \
    --aqua-username="Username" \
    --aqua-password="Password" 

Tests are equivilant to


helm repo add aqua https://helm.aquasec.com

helm repo update

helm upgrade --install --namespace aqua aqua . --set ke.aquasecret.kubeEnforcerToken=12345 --set imageCredentials.username=12345@gmail.com --set imageCredentials.password=12345 --set web.service.type=ClusterIP

Documentation

Overview

package aqua installs aqua helm charts. ref https://github.com/aquasecurity/aqua-helm

Index

Constants

View Source
const (
	DefaultMinimumNodes int = 1

	DefaultHelmChartRepoURL = "https://github.com/aquasecurity/aqua-helm/archive/refs/tags/6.0.2.tar.gz"
)

Variables

This section is empty.

Functions

func Env

func Env() string

func New

func New(cfg *Config) k8s_tester.Tester

Types

type Config

type Config struct {
	Enable bool `json:"enable"`
	Prompt bool `json:"-"`

	Stopc     chan struct{} `json:"-"`
	Logger    *zap.Logger   `json:"-"`
	LogWriter io.Writer     `json:"-"`
	Client    client.Client `json:"-"`

	// MinimumNodes is the minimum number of Kubernetes nodes required for installing this addon.
	MinimumNodes int `json:"minimum_nodes"`
	// HelmChartRepoURL is the helm chart repo URL.
	HelmChartRepoURL string `json:"helm_chart_repo_url"`
	// Namespace to create test resources.
	Namespace string `json:"namespace"`
	// AquaLicense is the license used from the suceess center for Kubenenforcer
	AquaLicense string `json:"aqua_license"`
	// AquaUsername is the username for the suceess center used to pull images
	AquaUsername string `json:"aqua_username"`
	// AquaUsername is the password for the suceess center used to pull images
	AquaPassword string `json:"aqua_password"`
}

func NewDefault

func NewDefault() *Config

func (*Config) ValidateAndSetDefaults

func (cfg *Config) ValidateAndSetDefaults() error

Directories

Path Synopsis
cmd
k8s-tester-aqua
k8s-tester-aqua installs aqua using helm, and tests that it's able to function correctly.
k8s-tester-aqua installs aqua using helm, and tests that it's able to function correctly.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL