mirror of
https://github.com/holos-run/holos.git
synced 2026-03-18 10:40:47 +00:00
Compare commits
84 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6cc4a57b62 | ||
|
|
31280acbae | ||
|
|
6f0928b12c | ||
|
|
c6e9250d60 | ||
|
|
104bda459f | ||
|
|
bd2effa183 | ||
|
|
562412fbe7 | ||
|
|
fd6fbe5598 | ||
|
|
67472e1e1c | ||
|
|
d64c3e8c66 | ||
|
|
f344f97374 | ||
|
|
770088b912 | ||
|
|
cb9b39c3ca | ||
|
|
0f34b20546 | ||
|
|
0d7bbbb659 | ||
|
|
3f3e36bbe9 | ||
|
|
9f41478d33 | ||
|
|
b86fee04fc | ||
|
|
c78da6949f | ||
|
|
7b215bb8f1 | ||
|
|
78cec76a96 | ||
|
|
0e98ad2ecb | ||
|
|
30bb3f183a | ||
|
|
1369338f3c | ||
|
|
ac03f64724 | ||
|
|
bea4468972 | ||
|
|
224adffa15 | ||
|
|
b4d34ffdbc | ||
|
|
a85db9cf5e | ||
|
|
990c82432c | ||
|
|
e3673b594c | ||
|
|
f8cf278a24 | ||
|
|
b0bc596a49 | ||
|
|
4501ceec05 | ||
|
|
4183fdfd42 | ||
|
|
2595793019 | ||
|
|
aa3d1914b1 | ||
|
|
679ddbb6bf | ||
|
|
b1d7d07a04 | ||
|
|
5f58263232 | ||
|
|
b6bdd072f7 | ||
|
|
509f2141ac | ||
|
|
4c2bc34d58 | ||
|
|
d831070f53 | ||
|
|
340715f76c | ||
|
|
64ffacfc7a | ||
|
|
54acea42cb | ||
|
|
5ef8e75194 | ||
|
|
cb2b5c0f49 | ||
|
|
fd5a2fdbc1 | ||
|
|
eb3e272612 | ||
|
|
9f2a51bde8 | ||
|
|
2b3b5a4887 | ||
|
|
7426e8f867 | ||
|
|
cf0c455aa2 | ||
|
|
752a3f912d | ||
|
|
7d5852d675 | ||
|
|
66b4ca0e6c | ||
|
|
b3f682453d | ||
|
|
0c3181ae05 | ||
|
|
18cbff0c13 | ||
|
|
b4fca0929c | ||
|
|
911d65bdc6 | ||
|
|
2a5eccf0c1 | ||
|
|
9db4873205 | ||
|
|
f90e83e142 | ||
|
|
bdd2964edb | ||
|
|
56375b82d8 | ||
|
|
dc27489249 | ||
|
|
7d8a618e25 | ||
|
|
646f6fcdb0 | ||
|
|
4ce39db745 | ||
|
|
eba58d1639 | ||
|
|
765832d90d | ||
|
|
d1163d689a | ||
|
|
63009ba419 | ||
|
|
9c42cf9109 | ||
|
|
3fce5188a2 | ||
|
|
fde88ad5eb | ||
|
|
7a8d30f833 | ||
|
|
8987442b91 | ||
|
|
a6af3a46cf | ||
|
|
71d545a883 | ||
|
|
044d3082d9 |
7
.github/workflows/lint.yaml
vendored
7
.github/workflows/lint.yaml
vendored
@@ -1,6 +1,7 @@
|
||||
---
|
||||
# https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#how-to-use
|
||||
name: Lint
|
||||
on:
|
||||
"on":
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
@@ -14,7 +15,7 @@ permissions:
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: [self-hosted, k8s]
|
||||
runs-on: gha-rs
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
@@ -22,6 +23,6 @@ jobs:
|
||||
go-version: stable
|
||||
cache: false
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
uses: golangci/golangci-lint-action@v4
|
||||
with:
|
||||
version: latest
|
||||
|
||||
7
.github/workflows/release.yaml
vendored
7
.github/workflows/release.yaml
vendored
@@ -2,17 +2,20 @@ name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
# Run only against tags
|
||||
tags:
|
||||
- '*'
|
||||
branches:
|
||||
- release
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: [self-hosted, k8s]
|
||||
runs-on: gha-rs
|
||||
steps:
|
||||
- name: Provide GPG and Git
|
||||
run: sudo apt update && sudo apt -qq -y install gnupg git
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
||||
11
.github/workflows/test.yaml
vendored
11
.github/workflows/test.yaml
vendored
@@ -13,7 +13,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: [self-hosted, k8s]
|
||||
runs-on: gha-rs
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -23,5 +23,14 @@ jobs:
|
||||
with:
|
||||
go-version: stable
|
||||
|
||||
- name: Provide unzip for Helm
|
||||
run: sudo apt update && sudo apt -qq -y install curl zip unzip tar bzip2
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v4
|
||||
|
||||
- name: Set up Kubectl
|
||||
uses: azure/setup-kubectl@v3
|
||||
|
||||
- name: Test
|
||||
run: ./scripts/test
|
||||
|
||||
2
.golangci.yaml
Normal file
2
.golangci.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
run:
|
||||
timeout: 5m
|
||||
7
Makefile
7
Makefile
@@ -44,13 +44,18 @@ tidy: ## Tidy go module.
|
||||
go mod tidy
|
||||
|
||||
.PHONY: fmt
|
||||
fmt: ## Format Go code.
|
||||
fmt: ## Format code.
|
||||
cd docs/examples && cue fmt ./...
|
||||
go fmt ./...
|
||||
|
||||
.PHONY: vet
|
||||
vet: ## Vet Go code.
|
||||
go vet ./...
|
||||
|
||||
.PHONY: gencue
|
||||
gencue: ## Generate CUE definitions
|
||||
cd docs/examples && cue get go github.com/holos-run/holos/api/...
|
||||
|
||||
.PHONY: generate
|
||||
generate: ## Generate code.
|
||||
go generate ./...
|
||||
|
||||
39
api/v1alpha1/buildplan.go
Normal file
39
api/v1alpha1/buildplan.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// BuildPlan is the primary interface between CUE and the Holos cli.
|
||||
type BuildPlan struct {
|
||||
TypeMeta `json:",inline" yaml:",inline"`
|
||||
// Metadata represents the holos component name
|
||||
Metadata ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
|
||||
Spec BuildPlanSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
|
||||
}
|
||||
|
||||
type BuildPlanSpec struct {
|
||||
Disabled bool `json:"disabled,omitempty" yaml:"disabled,omitempty"`
|
||||
Components BuildPlanComponents `json:"components,omitempty" yaml:"components,omitempty"`
|
||||
}
|
||||
|
||||
type BuildPlanComponents struct {
|
||||
HelmChartList []HelmChart `json:"helmChartList,omitempty" yaml:"helmChartList,omitempty"`
|
||||
KubernetesObjectsList []KubernetesObjects `json:"kubernetesObjectsList,omitempty" yaml:"kubernetesObjectsList,omitempty"`
|
||||
KustomizeBuildList []KustomizeBuild `json:"kustomizeBuildList,omitempty" yaml:"kustomizeBuildList,omitempty"`
|
||||
}
|
||||
|
||||
func (bp *BuildPlan) Validate() error {
|
||||
errs := make([]string, 0, 2)
|
||||
if bp.Kind != BuildPlanKind {
|
||||
errs = append(errs, fmt.Sprintf("kind invalid: want: %s have: %s", BuildPlanKind, bp.Kind))
|
||||
}
|
||||
if bp.APIVersion != APIVersion {
|
||||
errs = append(errs, fmt.Sprintf("apiVersion invalid: want: %s have: %s", APIVersion, bp.APIVersion))
|
||||
}
|
||||
if len(errs) > 0 {
|
||||
return fmt.Errorf("invalid BuildPlan: " + strings.Join(errs, ", "))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
22
api/v1alpha1/component.go
Normal file
22
api/v1alpha1/component.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package v1alpha1
|
||||
|
||||
// HolosComponent defines the fields common to all holos component kinds including the Render Result.
|
||||
type HolosComponent struct {
|
||||
TypeMeta `json:",inline" yaml:",inline"`
|
||||
// Metadata represents the holos component name
|
||||
Metadata ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
|
||||
// APIObjectMap holds the marshalled representation of api objects. Think of
|
||||
// these as resources overlaid at the back of the render pipeline.
|
||||
APIObjectMap APIObjectMap `json:"apiObjectMap,omitempty" yaml:"apiObjectMap,omitempty"`
|
||||
// Kustomization holds the marshalled representation of the flux kustomization
|
||||
// which reconciles resources in git with the api server.
|
||||
Kustomization `json:",inline" yaml:",inline"`
|
||||
// Kustomize represents a kubectl kustomize build post-processing step.
|
||||
Kustomize `json:",inline" yaml:",inline"`
|
||||
// Skip causes holos to take no action regarding the component.
|
||||
Skip bool
|
||||
}
|
||||
|
||||
func (hc *HolosComponent) NewResult() *Result {
|
||||
return &Result{HolosComponent: *hc}
|
||||
}
|
||||
11
api/v1alpha1/constants.go
Normal file
11
api/v1alpha1/constants.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package v1alpha1
|
||||
|
||||
const (
|
||||
APIVersion = "holos.run/v1alpha1"
|
||||
BuildPlanKind = "BuildPlan"
|
||||
HelmChartKind = "HelmChart"
|
||||
// ChartDir is the directory name created in the holos component directory to cache a chart.
|
||||
ChartDir = "vendor"
|
||||
// ResourcesFile is the file name used to store component output when post-processing with kustomize.
|
||||
ResourcesFile = "resources.yaml"
|
||||
)
|
||||
2
api/v1alpha1/doc.go
Normal file
2
api/v1alpha1/doc.go
Normal file
@@ -0,0 +1,2 @@
|
||||
// Package v1alpha1 defines the api boundary between CUE and Holos.
|
||||
package v1alpha1
|
||||
154
api/v1alpha1/helm.go
Normal file
154
api/v1alpha1/helm.go
Normal file
@@ -0,0 +1,154 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/holos-run/holos"
|
||||
"github.com/holos-run/holos/pkg/logger"
|
||||
"github.com/holos-run/holos/pkg/util"
|
||||
"github.com/holos-run/holos/pkg/wrapper"
|
||||
)
|
||||
|
||||
// A HelmChart represents a helm command to provide chart values in order to render kubernetes api objects.
|
||||
type HelmChart struct {
|
||||
HolosComponent `json:",inline" yaml:",inline"`
|
||||
// Namespace is the namespace to install into. TODO: Use metadata.namespace instead.
|
||||
Namespace string `json:"namespace"`
|
||||
Chart Chart `json:"chart"`
|
||||
ValuesContent string `json:"valuesContent"`
|
||||
EnableHooks bool `json:"enableHooks"`
|
||||
}
|
||||
|
||||
type Chart struct {
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"`
|
||||
Release string `json:"release"`
|
||||
Repository Repository `json:"repository,omitempty"`
|
||||
}
|
||||
|
||||
type Repository struct {
|
||||
Name string `json:"name"`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
func (hc *HelmChart) Render(ctx context.Context, path holos.PathComponent) (*Result, error) {
|
||||
result := Result{HolosComponent: hc.HolosComponent}
|
||||
if err := hc.helm(ctx, &result, path); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result.addObjectMap(ctx, hc.APIObjectMap)
|
||||
if err := result.kustomize(ctx); err != nil {
|
||||
return nil, wrapper.Wrap(fmt.Errorf("could not kustomize: %w", err))
|
||||
}
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// runHelm provides the values produced by CUE to helm template and returns
|
||||
// the rendered kubernetes api objects in the result.
|
||||
func (hc *HelmChart) helm(ctx context.Context, r *Result, path holos.PathComponent) error {
|
||||
log := logger.FromContext(ctx).With("chart", hc.Chart.Name)
|
||||
if hc.Chart.Name == "" {
|
||||
log.WarnContext(ctx, "skipping helm: no chart name specified, use a different component type")
|
||||
return nil
|
||||
}
|
||||
|
||||
cachedChartPath := filepath.Join(string(path), ChartDir, filepath.Base(hc.Chart.Name))
|
||||
if isNotExist(cachedChartPath) {
|
||||
// Add repositories
|
||||
repo := hc.Chart.Repository
|
||||
if repo.URL != "" {
|
||||
out, err := util.RunCmd(ctx, "helm", "repo", "add", repo.Name, repo.URL)
|
||||
if err != nil {
|
||||
log.ErrorContext(ctx, "could not run helm", "stderr", out.Stderr.String(), "stdout", out.Stdout.String())
|
||||
return wrapper.Wrap(fmt.Errorf("could not run helm repo add: %w", err))
|
||||
}
|
||||
// Update repository
|
||||
out, err = util.RunCmd(ctx, "helm", "repo", "update", repo.Name)
|
||||
if err != nil {
|
||||
log.ErrorContext(ctx, "could not run helm", "stderr", out.Stderr.String(), "stdout", out.Stdout.String())
|
||||
return wrapper.Wrap(fmt.Errorf("could not run helm repo update: %w", err))
|
||||
}
|
||||
} else {
|
||||
log.DebugContext(ctx, "no chart repository url proceeding assuming oci chart")
|
||||
}
|
||||
|
||||
// Cache the chart
|
||||
if err := cacheChart(ctx, path, ChartDir, hc.Chart); err != nil {
|
||||
return fmt.Errorf("could not cache chart: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Write values file
|
||||
tempDir, err := os.MkdirTemp("", "holos")
|
||||
if err != nil {
|
||||
return wrapper.Wrap(fmt.Errorf("could not make temp dir: %w", err))
|
||||
}
|
||||
defer util.Remove(ctx, tempDir)
|
||||
|
||||
valuesPath := filepath.Join(tempDir, "values.yaml")
|
||||
if err := os.WriteFile(valuesPath, []byte(hc.ValuesContent), 0644); err != nil {
|
||||
return wrapper.Wrap(fmt.Errorf("could not write values: %w", err))
|
||||
}
|
||||
log.DebugContext(ctx, "helm: wrote values", "path", valuesPath, "bytes", len(hc.ValuesContent))
|
||||
|
||||
// Run charts
|
||||
chart := hc.Chart
|
||||
args := []string{"template"}
|
||||
if !hc.EnableHooks {
|
||||
args = append(args, "--no-hooks")
|
||||
}
|
||||
namespace := hc.Namespace
|
||||
args = append(args, "--include-crds", "--values", valuesPath, "--namespace", namespace, "--kubeconfig", "/dev/null", "--version", chart.Version, chart.Release, cachedChartPath)
|
||||
helmOut, err := util.RunCmd(ctx, "helm", args...)
|
||||
if err != nil {
|
||||
stderr := helmOut.Stderr.String()
|
||||
lines := strings.Split(stderr, "\n")
|
||||
for _, line := range lines {
|
||||
if strings.HasPrefix(line, "Error:") {
|
||||
err = fmt.Errorf("%s: %w", line, err)
|
||||
}
|
||||
}
|
||||
return wrapper.Wrap(fmt.Errorf("could not run helm template: %w", err))
|
||||
}
|
||||
|
||||
r.accumulatedOutput = helmOut.Stdout.String()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// cacheChart stores a cached copy of Chart in the chart subdirectory of path.
|
||||
func cacheChart(ctx context.Context, path holos.PathComponent, chartDir string, chart Chart) error {
|
||||
log := logger.FromContext(ctx)
|
||||
|
||||
cacheTemp, err := os.MkdirTemp(string(path), chartDir)
|
||||
if err != nil {
|
||||
return wrapper.Wrap(fmt.Errorf("could not make temp dir: %w", err))
|
||||
}
|
||||
defer util.Remove(ctx, cacheTemp)
|
||||
|
||||
chartName := chart.Name
|
||||
if chart.Repository.Name != "" {
|
||||
chartName = fmt.Sprintf("%s/%s", chart.Repository.Name, chart.Name)
|
||||
}
|
||||
helmOut, err := util.RunCmd(ctx, "helm", "pull", "--destination", cacheTemp, "--untar=true", "--version", chart.Version, chartName)
|
||||
if err != nil {
|
||||
return wrapper.Wrap(fmt.Errorf("could not run helm pull: %w", err))
|
||||
}
|
||||
log.Debug("helm pull", "stdout", helmOut.Stdout, "stderr", helmOut.Stderr)
|
||||
|
||||
cachePath := filepath.Join(string(path), chartDir)
|
||||
if err := os.Rename(cacheTemp, cachePath); err != nil {
|
||||
return wrapper.Wrap(fmt.Errorf("could not rename: %w", err))
|
||||
}
|
||||
log.InfoContext(ctx, "cached", "chart", chart.Name, "version", chart.Version, "path", cachePath)
|
||||
|
||||
return nil
|
||||
}
|
||||
func isNotExist(path string) bool {
|
||||
_, err := os.Stat(path)
|
||||
return os.IsNotExist(err)
|
||||
}
|
||||
20
api/v1alpha1/kubernetesobjects.go
Normal file
20
api/v1alpha1/kubernetesobjects.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/holos-run/holos"
|
||||
)
|
||||
|
||||
const KubernetesObjectsKind = "KubernetesObjects"
|
||||
|
||||
// KubernetesObjects represents CUE output which directly provides Kubernetes api objects to holos.
|
||||
type KubernetesObjects struct {
|
||||
HolosComponent `json:",inline" yaml:",inline"`
|
||||
}
|
||||
|
||||
// Render produces kubernetes api objects from the APIObjectMap
|
||||
func (o *KubernetesObjects) Render(ctx context.Context, path holos.PathComponent) (*Result, error) {
|
||||
result := Result{HolosComponent: o.HolosComponent}
|
||||
result.addObjectMap(ctx, o.APIObjectMap)
|
||||
return &result, nil
|
||||
}
|
||||
7
api/v1alpha1/kustomization.go
Normal file
7
api/v1alpha1/kustomization.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package v1alpha1
|
||||
|
||||
// Kustomization holds the rendered flux kustomization api object content for git ops.
|
||||
type Kustomization struct {
|
||||
// KsContent is the yaml representation of the flux kustomization for gitops.
|
||||
KsContent string `json:"ksContent,omitempty" yaml:"ksContent,omitempty"`
|
||||
}
|
||||
46
api/v1alpha1/kustomize.go
Normal file
46
api/v1alpha1/kustomize.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/holos-run/holos"
|
||||
"github.com/holos-run/holos/pkg/logger"
|
||||
"github.com/holos-run/holos/pkg/util"
|
||||
"github.com/holos-run/holos/pkg/wrapper"
|
||||
)
|
||||
|
||||
const KustomizeBuildKind = "KustomizeBuild"
|
||||
|
||||
// Kustomize represents resources necessary to execute a kustomize build.
|
||||
// Intended for at least two use cases:
|
||||
//
|
||||
// 1. Process raw yaml file resources in a holos component directory.
|
||||
// 2. Post process a HelmChart to inject istio, add custom labels, etc...
|
||||
type Kustomize struct {
|
||||
// KustomizeFiles holds file contents for kustomize, e.g. patch files.
|
||||
KustomizeFiles FileContentMap `json:"kustomizeFiles,omitempty" yaml:"kustomizeFiles,omitempty"`
|
||||
// ResourcesFile is the file name used for api objects in kustomization.yaml
|
||||
ResourcesFile string `json:"resourcesFile,omitempty" yaml:"resourcesFile,omitempty"`
|
||||
}
|
||||
|
||||
// KustomizeBuild renders plain yaml files in the holos component directory using kubectl kustomize build.
|
||||
type KustomizeBuild struct {
|
||||
HolosComponent `json:",inline" yaml:",inline"`
|
||||
}
|
||||
|
||||
// Render produces a Result by executing kubectl kustomize on the holos
|
||||
// component path. Useful for processing raw yaml files.
|
||||
func (kb *KustomizeBuild) Render(ctx context.Context, path holos.PathComponent) (*Result, error) {
|
||||
log := logger.FromContext(ctx)
|
||||
result := Result{HolosComponent: kb.HolosComponent}
|
||||
// Run kustomize.
|
||||
kOut, err := util.RunCmd(ctx, "kubectl", "kustomize", string(path))
|
||||
if err != nil {
|
||||
log.ErrorContext(ctx, kOut.Stderr.String())
|
||||
return nil, wrapper.Wrap(err)
|
||||
}
|
||||
// Replace the accumulated output
|
||||
result.accumulatedOutput = kOut.Stdout.String()
|
||||
// Add CUE based api objects.
|
||||
result.addObjectMap(ctx, kb.APIObjectMap)
|
||||
return &result, nil
|
||||
}
|
||||
8
api/v1alpha1/objectmap.go
Normal file
8
api/v1alpha1/objectmap.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package v1alpha1
|
||||
|
||||
// APIObjectMap is the shape of marshalled api objects returned from cue to the
|
||||
// holos cli. A map is used to improve the clarity of error messages from cue.
|
||||
type APIObjectMap map[string]map[string]string
|
||||
|
||||
// FileContentMap is a map of file names to file contents.
|
||||
type FileContentMap map[string]string
|
||||
15
api/v1alpha1/objectmeta.go
Normal file
15
api/v1alpha1/objectmeta.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package v1alpha1
|
||||
|
||||
// ObjectMeta represents metadata of a holos component object. The fields are a
|
||||
// copy of upstream kubernetes api machinery but are by holos objects distinct
|
||||
// from kubernetes api objects.
|
||||
type ObjectMeta struct {
|
||||
// Name uniquely identifies the holos component instance and must be suitable as a file name.
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
// Namespace confines a holos component to a single namespace via kustomize if set.
|
||||
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
|
||||
// Labels are not used but are copied from api machinery ObjectMeta for completeness.
|
||||
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
|
||||
// Annotations are not used but are copied from api machinery ObjectMeta for completeness.
|
||||
Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
|
||||
}
|
||||
21
api/v1alpha1/render.go
Normal file
21
api/v1alpha1/render.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/holos-run/holos"
|
||||
)
|
||||
|
||||
type Renderer interface {
|
||||
GetKind() string
|
||||
Render(ctx context.Context, path holos.PathComponent) (*Result, error)
|
||||
}
|
||||
|
||||
// Render produces a Result representing the kubernetes api objects to
|
||||
// configure. Each of the various holos component types, e.g. Helm, Kustomize,
|
||||
// et al, should implement the Renderer interface. This process is best
|
||||
// conceptualized as a data pipeline, for example a component may render a
|
||||
// result by first calling helm template, then passing the result through
|
||||
// kustomize, then mixing in overlay api objects.
|
||||
func Render(ctx context.Context, r Renderer, path holos.PathComponent) (*Result, error) {
|
||||
return r.Render(ctx, path)
|
||||
}
|
||||
137
api/v1alpha1/result.go
Normal file
137
api/v1alpha1/result.go
Normal file
@@ -0,0 +1,137 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/holos-run/holos/pkg/logger"
|
||||
"github.com/holos-run/holos/pkg/util"
|
||||
"github.com/holos-run/holos/pkg/wrapper"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
)
|
||||
|
||||
// Result is the build result for display or writing. Holos components Render the Result as a data pipeline.
|
||||
type Result struct {
|
||||
HolosComponent
|
||||
// accumulatedOutput accumulates rendered api objects.
|
||||
accumulatedOutput string
|
||||
}
|
||||
|
||||
func (r *Result) Name() string {
|
||||
return r.Metadata.Name
|
||||
}
|
||||
|
||||
func (r *Result) Filename(writeTo string, cluster string) string {
|
||||
name := r.Metadata.Name
|
||||
return filepath.Join(writeTo, "clusters", cluster, "components", name, name+".gen.yaml")
|
||||
}
|
||||
|
||||
func (r *Result) KustomizationFilename(writeTo string, cluster string) string {
|
||||
return filepath.Join(writeTo, "clusters", cluster, "holos", "components", r.Metadata.Name+"-kustomization.gen.yaml")
|
||||
}
|
||||
|
||||
// AccumulatedOutput returns the accumulated rendered output.
|
||||
func (r *Result) AccumulatedOutput() string {
|
||||
return r.accumulatedOutput
|
||||
}
|
||||
|
||||
// addObjectMap renders the provided APIObjectMap into the accumulated output.
|
||||
func (r *Result) addObjectMap(ctx context.Context, objectMap APIObjectMap) {
|
||||
log := logger.FromContext(ctx)
|
||||
b := []byte(r.AccumulatedOutput())
|
||||
kinds := make([]string, 0, len(objectMap))
|
||||
// Sort the keys
|
||||
for kind := range objectMap {
|
||||
kinds = append(kinds, kind)
|
||||
}
|
||||
slices.Sort(kinds)
|
||||
|
||||
for _, kind := range kinds {
|
||||
v := objectMap[kind]
|
||||
// Sort the keys
|
||||
names := make([]string, 0, len(v))
|
||||
for name := range v {
|
||||
names = append(names, name)
|
||||
}
|
||||
slices.Sort(names)
|
||||
|
||||
for _, name := range names {
|
||||
yamlString := v[name]
|
||||
log.Debug(fmt.Sprintf("%s/%s", kind, name), "kind", kind, "name", name)
|
||||
b = util.EnsureNewline(b)
|
||||
header := fmt.Sprintf("---\n# Source: CUE apiObjects.%s.%s\n", kind, name)
|
||||
b = append(b, []byte(header+yamlString)...)
|
||||
b = util.EnsureNewline(b)
|
||||
}
|
||||
}
|
||||
r.accumulatedOutput = string(b)
|
||||
}
|
||||
|
||||
// kustomize replaces the accumulated output with the output of kustomize build
|
||||
func (r *Result) kustomize(ctx context.Context) error {
|
||||
log := logger.FromContext(ctx)
|
||||
if r.ResourcesFile == "" {
|
||||
log.DebugContext(ctx, "skipping kustomize: no resourcesFile")
|
||||
return nil
|
||||
}
|
||||
if len(r.KustomizeFiles) < 1 {
|
||||
log.DebugContext(ctx, "skipping kustomize: no kustomizeFiles")
|
||||
return nil
|
||||
}
|
||||
tempDir, err := os.MkdirTemp("", "holos.kustomize")
|
||||
if err != nil {
|
||||
return wrapper.Wrap(err)
|
||||
}
|
||||
defer util.Remove(ctx, tempDir)
|
||||
|
||||
// Write the main api object resources file for kustomize.
|
||||
target := filepath.Join(tempDir, r.ResourcesFile)
|
||||
b := []byte(r.AccumulatedOutput())
|
||||
b = util.EnsureNewline(b)
|
||||
if err := os.WriteFile(target, b, 0644); err != nil {
|
||||
return wrapper.Wrap(fmt.Errorf("could not write resources: %w", err))
|
||||
}
|
||||
log.DebugContext(ctx, "wrote: "+target, "op", "write", "path", target, "bytes", len(b))
|
||||
|
||||
// Write the kustomization tree, kustomization.yaml must be in this map for kustomize to work.
|
||||
for file, content := range r.KustomizeFiles {
|
||||
target := filepath.Join(tempDir, file)
|
||||
if err := os.MkdirAll(filepath.Dir(target), 0755); err != nil {
|
||||
return wrapper.Wrap(err)
|
||||
}
|
||||
b := []byte(content)
|
||||
b = util.EnsureNewline(b)
|
||||
if err := os.WriteFile(target, b, 0644); err != nil {
|
||||
return wrapper.Wrap(fmt.Errorf("could not write: %w", err))
|
||||
}
|
||||
log.DebugContext(ctx, "wrote: "+target, "op", "write", "path", target, "bytes", len(b))
|
||||
}
|
||||
|
||||
// Run kustomize.
|
||||
kOut, err := util.RunCmd(ctx, "kubectl", "kustomize", tempDir)
|
||||
if err != nil {
|
||||
log.ErrorContext(ctx, kOut.Stderr.String())
|
||||
return wrapper.Wrap(err)
|
||||
}
|
||||
// Replace the accumulated output
|
||||
r.accumulatedOutput = kOut.Stdout.String()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Save writes the content to the filesystem for git ops.
|
||||
func (r *Result) Save(ctx context.Context, path string, content string) error {
|
||||
log := logger.FromContext(ctx)
|
||||
dir := filepath.Dir(path)
|
||||
if err := os.MkdirAll(dir, os.FileMode(0775)); err != nil {
|
||||
log.WarnContext(ctx, "could not mkdir", "path", dir, "err", err)
|
||||
return wrapper.Wrap(err)
|
||||
}
|
||||
// Write the kube api objects
|
||||
if err := os.WriteFile(path, []byte(content), os.FileMode(0644)); err != nil {
|
||||
log.WarnContext(ctx, "could not write", "path", path, "err", err)
|
||||
return wrapper.Wrap(err)
|
||||
}
|
||||
log.DebugContext(ctx, "out: wrote "+path, "action", "write", "path", path, "status", "ok")
|
||||
return nil
|
||||
}
|
||||
10
api/v1alpha1/typemeta.go
Normal file
10
api/v1alpha1/typemeta.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package v1alpha1
|
||||
|
||||
type TypeMeta struct {
|
||||
Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
|
||||
APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"`
|
||||
}
|
||||
|
||||
func (tm *TypeMeta) GetKind() string {
|
||||
return tm.Kind
|
||||
}
|
||||
29
cmd/holos/testdata/constraints.txt
vendored
29
cmd/holos/testdata/constraints.txt
vendored
@@ -1,7 +1,6 @@
|
||||
# Want support for intermediary constraints
|
||||
exec holos build ./foo/... --log-level debug
|
||||
stdout '^bf2bc7f9-9ba0-4f9e-9bd2-9a205627eb0b$'
|
||||
stderr 'processing holos component kind Skip'
|
||||
|
||||
-- cue.mod --
|
||||
package holos
|
||||
@@ -12,31 +11,21 @@ metadata: name: "jeff"
|
||||
-- foo/bar/bar.cue --
|
||||
package holos
|
||||
|
||||
#KubernetesObjects & {
|
||||
apiObjectMap: foo: bar: "bf2bc7f9-9ba0-4f9e-9bd2-9a205627eb0b"
|
||||
}
|
||||
spec: components: KubernetesObjectsList: [
|
||||
#KubernetesObjects & {
|
||||
apiObjectMap: foo: bar: "bf2bc7f9-9ba0-4f9e-9bd2-9a205627eb0b"
|
||||
}
|
||||
]
|
||||
-- schema.cue --
|
||||
package holos
|
||||
|
||||
cluster: string @tag(cluster, string)
|
||||
|
||||
// #OutputTypeMeta is shared among all output types
|
||||
#OutputTypeMeta: {
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: #KubernetesObjects.kind | #NoOutput.kind
|
||||
metadata: name: string
|
||||
}
|
||||
_cluster: string @tag(cluster, string)
|
||||
|
||||
#KubernetesObjects: {
|
||||
#OutputTypeMeta
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "KubernetesObjects"
|
||||
apiObjectMap: {...}
|
||||
}
|
||||
|
||||
#NoOutput: {
|
||||
#OutputTypeMeta
|
||||
kind: string | *"Skip"
|
||||
metadata: name: string | *"skipped"
|
||||
}
|
||||
|
||||
#NoOutput & {}
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "BuildPlan"
|
||||
|
||||
15
cmd/holos/testdata/issue15_cue_errors.txt
vendored
15
cmd/holos/testdata/issue15_cue_errors.txt
vendored
@@ -1,16 +1,17 @@
|
||||
# Want cue errors to show files and lines
|
||||
! exec holos build .
|
||||
stderr '^apiObjectMap.foo.bar: cannot convert non-concrete value string'
|
||||
stderr '/component.cue:7:20$'
|
||||
stderr 'apiObjectMap.foo.bar: cannot convert incomplete value'
|
||||
stderr '/component.cue:\d+:\d+$'
|
||||
|
||||
-- cue.mod --
|
||||
package holos
|
||||
-- component.cue --
|
||||
package holos
|
||||
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "KubernetesObjects"
|
||||
cluster: string @tag(cluster, string)
|
||||
_cluster: string @tag(cluster, string)
|
||||
|
||||
apiObjectMap: foo: bar: baz
|
||||
baz: string
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "BuildPlan"
|
||||
spec: components: KubernetesObjectsList: [{apiObjectMap: foo: bar: _baz}]
|
||||
|
||||
_baz: string
|
||||
|
||||
@@ -9,15 +9,17 @@ package holos
|
||||
package holos
|
||||
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "KubernetesObjects"
|
||||
cluster: string @tag(cluster, string)
|
||||
kind: "BuildPlan"
|
||||
spec: components: KubernetesObjectsList: [{apiObjectMap: #APIObjects.apiObjectMap}]
|
||||
|
||||
_cluster: string @tag(cluster, string)
|
||||
|
||||
#SecretStore: {
|
||||
kind: string
|
||||
metadata: name: string
|
||||
}
|
||||
|
||||
#APIObjects & {
|
||||
#APIObjects: {
|
||||
apiObjects: {
|
||||
SecretStore: {
|
||||
default: #SecretStore & { metadata: name: "default" }
|
||||
@@ -54,4 +56,3 @@ import "encoding/yaml"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,15 +10,17 @@ package holos
|
||||
package holos
|
||||
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "HelmChart"
|
||||
cluster: string @tag(cluster, string)
|
||||
kind: "BuildPlan"
|
||||
spec: components: HelmChartList: [{apiObjectMap: #APIObjects.apiObjectMap}]
|
||||
|
||||
_cluster: string @tag(cluster, string)
|
||||
|
||||
#SecretStore: {
|
||||
kind: string
|
||||
metadata: name: string
|
||||
}
|
||||
|
||||
#APIObjects & {
|
||||
#APIObjects: {
|
||||
apiObjects: {
|
||||
SecretStore: {
|
||||
default: #SecretStore & { metadata: name: "default" }
|
||||
@@ -55,4 +57,3 @@ import "encoding/yaml"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
286
cmd/holos/testdata/issue33_helm_stderr.txt
vendored
Normal file
286
cmd/holos/testdata/issue33_helm_stderr.txt
vendored
Normal file
@@ -0,0 +1,286 @@
|
||||
# Want helm errors to show up
|
||||
! exec holos build .
|
||||
stderr 'Error: execution error at \(zitadel/templates/secret_zitadel-masterkey.yaml:2:4\): Either set .Values.zitadel.masterkey xor .Values.zitadel.masterkeySecretName'
|
||||
|
||||
-- cue.mod --
|
||||
package holos
|
||||
-- zitadel.cue --
|
||||
package holos
|
||||
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "BuildPlan"
|
||||
spec: components: HelmChartList: [_HelmChart]
|
||||
|
||||
_cluster: string @tag(cluster, string)
|
||||
|
||||
_HelmChart: {
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "HelmChart"
|
||||
metadata: name: "zitadel"
|
||||
namespace: "zitadel"
|
||||
chart: {
|
||||
name: "zitadel"
|
||||
version: "7.9.0"
|
||||
release: name
|
||||
repository: {
|
||||
name: "zitadel"
|
||||
url: "https://charts.zitadel.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- vendor/zitadel/templates/secret_zitadel-masterkey.yaml --
|
||||
{{- if (or (and .Values.zitadel.masterkey .Values.zitadel.masterkeySecretName) (and (not .Values.zitadel.masterkey) (not .Values.zitadel.masterkeySecretName)) ) }}
|
||||
{{- fail "Either set .Values.zitadel.masterkey xor .Values.zitadel.masterkeySecretName" }}
|
||||
{{- end }}
|
||||
{{- if .Values.zitadel.masterkey -}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: Opaque
|
||||
metadata:
|
||||
name: zitadel-masterkey
|
||||
{{- with .Values.zitadel.masterkeyAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "zitadel.labels" . | nindent 4 }}
|
||||
stringData:
|
||||
masterkey: {{ .Values.zitadel.masterkey }}
|
||||
{{- end -}}
|
||||
-- vendor/zitadel/Chart.yaml --
|
||||
apiVersion: v2
|
||||
appVersion: v2.46.0
|
||||
description: A Helm chart for ZITADEL
|
||||
icon: https://zitadel.com/zitadel-logo-dark.svg
|
||||
kubeVersion: '>= 1.21.0-0'
|
||||
maintainers:
|
||||
- email: support@zitadel.com
|
||||
name: zitadel
|
||||
url: https://zitadel.com
|
||||
name: zitadel
|
||||
type: application
|
||||
version: 7.9.0
|
||||
-- vendor/zitadel/values.yaml --
|
||||
# Default values for zitadel.
|
||||
zitadel:
|
||||
# The ZITADEL config under configmapConfig is written to a Kubernetes ConfigMap
|
||||
# See all defaults here:
|
||||
# https://github.com/zitadel/zitadel/blob/main/cmd/defaults.yaml
|
||||
configmapConfig:
|
||||
ExternalSecure: true
|
||||
Machine:
|
||||
Identification:
|
||||
Hostname:
|
||||
Enabled: true
|
||||
Webhook:
|
||||
Enabled: false
|
||||
|
||||
# The ZITADEL config under secretConfig is written to a Kubernetes Secret
|
||||
# See all defaults here:
|
||||
# https://github.com/zitadel/zitadel/blob/main/cmd/defaults.yaml
|
||||
secretConfig:
|
||||
|
||||
# Annotations set on secretConfig secret
|
||||
secretConfigAnnotations:
|
||||
helm.sh/hook: pre-install,pre-upgrade
|
||||
helm.sh/hook-delete-policy: before-hook-creation
|
||||
helm.sh/hook-weight: "0"
|
||||
|
||||
# Reference the name of a secret that contains ZITADEL configuration.
|
||||
configSecretName:
|
||||
# The key under which the ZITADEL configuration is located in the secret.
|
||||
configSecretKey: config-yaml
|
||||
|
||||
# ZITADEL uses the masterkey for symmetric encryption.
|
||||
# You can generate it for example with tr -dc A-Za-z0-9 </dev/urandom | head -c 32
|
||||
masterkey: ""
|
||||
# Reference the name of the secret that contains the masterkey. The key should be named "masterkey".
|
||||
# Note: Either zitadel.masterkey or zitadel.masterkeySecretName must be set
|
||||
masterkeySecretName: ""
|
||||
|
||||
# Annotations set on masterkey secret
|
||||
masterkeyAnnotations:
|
||||
helm.sh/hook: pre-install,pre-upgrade
|
||||
helm.sh/hook-delete-policy: before-hook-creation
|
||||
helm.sh/hook-weight: "0"
|
||||
|
||||
# The CA Certificate needed for establishing secure database connections
|
||||
dbSslCaCrt: ""
|
||||
|
||||
# The Secret containing the CA certificate at key ca.crt needed for establishing secure database connections
|
||||
dbSslCaCrtSecret: ""
|
||||
|
||||
# The db admins secret containing the client certificate and key at tls.crt and tls.key needed for establishing secure database connections
|
||||
dbSslAdminCrtSecret: ""
|
||||
|
||||
# The db users secret containing the client certificate and key at tls.crt and tls.key needed for establishing secure database connections
|
||||
dbSslUserCrtSecret: ""
|
||||
|
||||
# Generate a self-signed certificate using an init container
|
||||
# This will also mount the generated files to /etc/tls/ so that you can reference them in the pod.
|
||||
# E.G. KeyPath: /etc/tls/tls.key CertPath: /etc/tls/tls.crt
|
||||
# By default, the SAN DNS names include, localhost, the POD IP address and the POD name. You may include one more by using additionalDnsName like "my.zitadel.fqdn".
|
||||
selfSignedCert:
|
||||
enabled: false
|
||||
additionalDnsName:
|
||||
|
||||
replicaCount: 3
|
||||
|
||||
image:
|
||||
repository: ghcr.io/zitadel/zitadel
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
|
||||
chownImage:
|
||||
repository: alpine
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "3.19"
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
# Annotations to add to the deployment
|
||||
annotations: {}
|
||||
|
||||
# Annotations to add to the configMap
|
||||
configMap:
|
||||
annotations:
|
||||
helm.sh/hook: pre-install,pre-upgrade
|
||||
helm.sh/hook-delete-policy: before-hook-creation
|
||||
helm.sh/hook-weight: "0"
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations:
|
||||
helm.sh/hook: pre-install,pre-upgrade
|
||||
helm.sh/hook-delete-policy: before-hook-creation
|
||||
helm.sh/hook-weight: "0"
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podAdditionalLabels: {}
|
||||
|
||||
podSecurityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
|
||||
securityContext: {}
|
||||
|
||||
# Additional environment variables
|
||||
env:
|
||||
[]
|
||||
# - name: ZITADEL_DATABASE_POSTGRES_HOST
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: postgres-pguser-postgres
|
||||
# key: host
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
# If service type is "ClusterIP", this can optionally be set to a fixed IP address.
|
||||
clusterIP: ""
|
||||
port: 8080
|
||||
protocol: http2
|
||||
annotations: {}
|
||||
scheme: HTTP
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
hosts:
|
||||
- host: localhost
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls: []
|
||||
|
||||
resources: {}
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
|
||||
topologySpreadConstraints: []
|
||||
|
||||
initJob:
|
||||
# Once ZITADEL is installed, the initJob can be disabled.
|
||||
enabled: true
|
||||
annotations:
|
||||
helm.sh/hook: pre-install,pre-upgrade
|
||||
helm.sh/hook-delete-policy: before-hook-creation
|
||||
helm.sh/hook-weight: "1"
|
||||
resources: {}
|
||||
backoffLimit: 5
|
||||
activeDeadlineSeconds: 300
|
||||
extraContainers: []
|
||||
podAnnotations: {}
|
||||
# Available init commands :
|
||||
# "": initialize ZITADEL instance (without skip anything)
|
||||
# database: initialize only the database
|
||||
# grant: set ALL grant to user
|
||||
# user: initialize only the database user
|
||||
# zitadel: initialize ZITADEL internals (skip "create user" and "create database")
|
||||
command: ""
|
||||
|
||||
setupJob:
|
||||
annotations:
|
||||
helm.sh/hook: pre-install,pre-upgrade
|
||||
helm.sh/hook-delete-policy: before-hook-creation
|
||||
helm.sh/hook-weight: "2"
|
||||
resources: {}
|
||||
activeDeadlineSeconds: 300
|
||||
extraContainers: []
|
||||
podAnnotations: {}
|
||||
additionalArgs:
|
||||
- "--init-projections=true"
|
||||
machinekeyWriter:
|
||||
image:
|
||||
repository: bitnami/kubectl
|
||||
tag: ""
|
||||
resources: {}
|
||||
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
startupProbe:
|
||||
enabled: true
|
||||
periodSeconds: 1
|
||||
failureThreshold: 30
|
||||
|
||||
metrics:
|
||||
enabled: false
|
||||
serviceMonitor:
|
||||
# If true, the chart creates a ServiceMonitor that is compatible with Prometheus Operator
|
||||
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ServiceMonitor.
|
||||
# The Prometheus community Helm chart installs this operator
|
||||
# https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#kube-prometheus-stack
|
||||
enabled: false
|
||||
honorLabels: false
|
||||
honorTimestamps: true
|
||||
|
||||
pdb:
|
||||
enabled: false
|
||||
# these values are used for the PDB and are mutally exclusive
|
||||
minAvailable: 1
|
||||
# maxUnavailable: 1
|
||||
annotations: {}
|
||||
36
cmd/holos/testdata/issue42_kustomize_build_kind.txt
vendored
Normal file
36
cmd/holos/testdata/issue42_kustomize_build_kind.txt
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# Kustomize is a supported holos component kind
|
||||
exec holos render --cluster-name=mycluster . --log-level=debug
|
||||
|
||||
# Want generated output
|
||||
cmp want.yaml deploy/clusters/mycluster/components/kstest/kstest.gen.yaml
|
||||
|
||||
-- cue.mod --
|
||||
package holos
|
||||
-- component.cue --
|
||||
package holos
|
||||
|
||||
_cluster: string @tag(cluster, string)
|
||||
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "BuildPlan"
|
||||
spec: components: KustomizeBuildList: [{metadata: name: "kstest"}]
|
||||
|
||||
-- kustomization.yaml --
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: mynamespace
|
||||
resources:
|
||||
- serviceaccount.yaml
|
||||
|
||||
-- serviceaccount.yaml --
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: test
|
||||
|
||||
-- want.yaml --
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: test
|
||||
namespace: mynamespace
|
||||
14
cmd/holos/testdata/issue72_disallow_unknown_fields.txt
vendored
Normal file
14
cmd/holos/testdata/issue72_disallow_unknown_fields.txt
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
# https://github.com/holos-run/holos/issues/72
|
||||
# Want holos to fail on unknown fields to catch typos and aid refactors
|
||||
! exec holos build .
|
||||
stderr 'unknown field \\"TypoKubernetesObjectsList\\"'
|
||||
|
||||
-- cue.mod --
|
||||
package holos
|
||||
-- component.cue --
|
||||
package holos
|
||||
_cluster: string @tag(cluster, string)
|
||||
|
||||
apiVersion: "holos.run/v1alpha1"
|
||||
kind: "BuildPlan"
|
||||
spec: components: TypoKubernetesObjectsList: []
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,82 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-certmanager/prod-mesh-certmanager.gen.yaml
|
||||
|
||||
package v1
|
||||
|
||||
import "strings"
|
||||
|
||||
// Order is a type to represent an Order with an ACME server
|
||||
#Order: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "acme.cert-manager.io/v1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "Order"
|
||||
metadata: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
spec!: #OrderSpec
|
||||
}
|
||||
#OrderSpec: {
|
||||
// CommonName is the common name as specified on the DER encoded
|
||||
// CSR. If specified, this value must also be present in
|
||||
// `dnsNames` or `ipAddresses`. This field must match the
|
||||
// corresponding field on the DER encoded CSR.
|
||||
commonName?: string
|
||||
|
||||
// DNSNames is a list of DNS names that should be included as part
|
||||
// of the Order validation process. This field must match the
|
||||
// corresponding field on the DER encoded CSR.
|
||||
dnsNames?: [...string]
|
||||
|
||||
// Duration is the duration for the not after date for the
|
||||
// requested certificate. this is set on order creation as pe the
|
||||
// ACME spec.
|
||||
duration?: string
|
||||
|
||||
// IPAddresses is a list of IP addresses that should be included
|
||||
// as part of the Order validation process. This field must match
|
||||
// the corresponding field on the DER encoded CSR.
|
||||
ipAddresses?: [...string]
|
||||
|
||||
// IssuerRef references a properly configured ACME-type Issuer
|
||||
// which should be used to create this Order. If the Issuer does
|
||||
// not exist, processing will be retried. If the Issuer is not an
|
||||
// 'ACME' Issuer, an error will be returned and the Order will be
|
||||
// marked as failed.
|
||||
issuerRef: {
|
||||
// Group of the resource being referred to.
|
||||
group?: string
|
||||
|
||||
// Kind of the resource being referred to.
|
||||
kind?: string
|
||||
|
||||
// Name of the resource being referred to.
|
||||
name: string
|
||||
}
|
||||
|
||||
// Certificate signing request bytes in DER encoding. This will be
|
||||
// used when finalizing the order. This field must be set on the
|
||||
// order.
|
||||
request: string
|
||||
}
|
||||
@@ -0,0 +1,422 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-certmanager/prod-mesh-certmanager.gen.yaml
|
||||
|
||||
package v1
|
||||
|
||||
import "strings"
|
||||
|
||||
// A Certificate resource should be created to ensure an up to
|
||||
// date and signed X.509 certificate is stored in the Kubernetes
|
||||
// Secret resource named in `spec.secretName`.
|
||||
// The stored certificate will be renewed before it expires (as
|
||||
// configured by `spec.renewBefore`).
|
||||
#Certificate: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "cert-manager.io/v1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "Certificate"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Specification of the desired state of the Certificate resource.
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
spec!: #CertificateSpec
|
||||
}
|
||||
|
||||
// Specification of the desired state of the Certificate resource.
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
#CertificateSpec: {
|
||||
// Defines extra output formats of the private key and signed
|
||||
// certificate chain to be written to this Certificate's target
|
||||
// Secret.
|
||||
// This is an Alpha Feature and is only enabled with the
|
||||
// `--feature-gates=AdditionalCertificateOutputFormats=true`
|
||||
// option set on both the controller and webhook components.
|
||||
additionalOutputFormats?: [...{
|
||||
// Type is the name of the format type that should be written to
|
||||
// the Certificate's target Secret.
|
||||
type: "DER" | "CombinedPEM"
|
||||
}]
|
||||
|
||||
// Requested common name X509 certificate subject attribute. More
|
||||
// info:
|
||||
// https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
|
||||
// NOTE: TLS clients will ignore this value when any subject
|
||||
// alternative name is set (see
|
||||
// https://tools.ietf.org/html/rfc6125#section-6.4.4).
|
||||
// Should have a length of 64 characters or fewer to avoid
|
||||
// generating invalid CSRs. Cannot be set if the `literalSubject`
|
||||
// field is set.
|
||||
commonName?: string
|
||||
|
||||
// Requested DNS subject alternative names.
|
||||
dnsNames?: [...string]
|
||||
|
||||
// Requested 'duration' (i.e. lifetime) of the Certificate. Note
|
||||
// that the issuer may choose to ignore the requested duration,
|
||||
// just like any other requested attribute.
|
||||
// If unset, this defaults to 90 days. Minimum accepted duration
|
||||
// is 1 hour. Value must be in units accepted by Go
|
||||
// time.ParseDuration https://golang.org/pkg/time/#ParseDuration.
|
||||
duration?: string
|
||||
|
||||
// Requested email subject alternative names.
|
||||
emailAddresses?: [...string]
|
||||
|
||||
// Whether the KeyUsage and ExtKeyUsage extensions should be set
|
||||
// in the encoded CSR.
|
||||
// This option defaults to true, and should only be disabled if
|
||||
// the target issuer does not support CSRs with these X509
|
||||
// KeyUsage/ ExtKeyUsage extensions.
|
||||
encodeUsagesInRequest?: bool
|
||||
|
||||
// Requested IP address subject alternative names.
|
||||
ipAddresses?: [...string]
|
||||
|
||||
// Requested basic constraints isCA value. The isCA value is used
|
||||
// to set the `isCA` field on the created CertificateRequest
|
||||
// resources. Note that the issuer may choose to ignore the
|
||||
// requested isCA value, just like any other requested attribute.
|
||||
// If true, this will automatically add the `cert sign` usage to
|
||||
// the list of requested `usages`.
|
||||
isCA?: bool
|
||||
|
||||
// Reference to the issuer responsible for issuing the
|
||||
// certificate. If the issuer is namespace-scoped, it must be in
|
||||
// the same namespace as the Certificate. If the issuer is
|
||||
// cluster-scoped, it can be used from any namespace.
|
||||
// The `name` field of the reference must always be specified.
|
||||
issuerRef: {
|
||||
// Group of the resource being referred to.
|
||||
group?: string
|
||||
|
||||
// Kind of the resource being referred to.
|
||||
kind?: string
|
||||
|
||||
// Name of the resource being referred to.
|
||||
name: string
|
||||
}
|
||||
|
||||
// Additional keystore output formats to be stored in the
|
||||
// Certificate's Secret.
|
||||
keystores?: {
|
||||
// JKS configures options for storing a JKS keystore in the
|
||||
// `spec.secretName` Secret resource.
|
||||
jks?: {
|
||||
// Create enables JKS keystore creation for the Certificate. If
|
||||
// true, a file named `keystore.jks` will be created in the
|
||||
// target Secret resource, encrypted using the password stored in
|
||||
// `passwordSecretRef`. The keystore file will be updated
|
||||
// immediately. If the issuer provided a CA certificate, a file
|
||||
// named `truststore.jks` will also be created in the target
|
||||
// Secret resource, encrypted using the password stored in
|
||||
// `passwordSecretRef` containing the issuing Certificate
|
||||
// Authority
|
||||
create: bool
|
||||
|
||||
// PasswordSecretRef is a reference to a key in a Secret resource
|
||||
// containing the password used to encrypt the JKS keystore.
|
||||
passwordSecretRef: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be defaulted, in
|
||||
// others it may be required.
|
||||
key?: string
|
||||
|
||||
// Name of the resource being referred to. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name: string
|
||||
}
|
||||
}
|
||||
|
||||
// PKCS12 configures options for storing a PKCS12 keystore in the
|
||||
// `spec.secretName` Secret resource.
|
||||
pkcs12?: {
|
||||
// Create enables PKCS12 keystore creation for the Certificate. If
|
||||
// true, a file named `keystore.p12` will be created in the
|
||||
// target Secret resource, encrypted using the password stored in
|
||||
// `passwordSecretRef`. The keystore file will be updated
|
||||
// immediately. If the issuer provided a CA certificate, a file
|
||||
// named `truststore.p12` will also be created in the target
|
||||
// Secret resource, encrypted using the password stored in
|
||||
// `passwordSecretRef` containing the issuing Certificate
|
||||
// Authority
|
||||
create: bool
|
||||
|
||||
// PasswordSecretRef is a reference to a key in a Secret resource
|
||||
// containing the password used to encrypt the PKCS12 keystore.
|
||||
passwordSecretRef: {
|
||||
// The key of the entry in the Secret resource's `data` field to
|
||||
// be used. Some instances of this field may be defaulted, in
|
||||
// others it may be required.
|
||||
key?: string
|
||||
|
||||
// Name of the resource being referred to. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name: string
|
||||
}
|
||||
|
||||
// Profile specifies the key and certificate encryption algorithms
|
||||
// and the HMAC algorithm used to create the PKCS12 keystore.
|
||||
// Default value is `LegacyRC2` for backward compatibility.
|
||||
// If provided, allowed values are: `LegacyRC2`: Deprecated. Not
|
||||
// supported by default in OpenSSL 3 or Java 20. `LegacyDES`:
|
||||
// Less secure algorithm. Use this option for maximal
|
||||
// compatibility. `Modern2023`: Secure algorithm. Use this option
|
||||
// in case you have to always use secure algorithms (eg. because
|
||||
// of company policy). Please note that the security of the
|
||||
// algorithm is not that important in reality, because the
|
||||
// unencrypted certificate and private key are also stored in the
|
||||
// Secret.
|
||||
profile?: "LegacyRC2" | "LegacyDES" | "Modern2023"
|
||||
}
|
||||
}
|
||||
|
||||
// Requested X.509 certificate subject, represented using the LDAP
|
||||
// "String Representation of a Distinguished Name" [1].
|
||||
// Important: the LDAP string format also specifies the order of
|
||||
// the attributes in the subject, this is important when issuing
|
||||
// certs for LDAP authentication. Example:
|
||||
// `CN=foo,DC=corp,DC=example,DC=com` More info [1]:
|
||||
// https://datatracker.ietf.org/doc/html/rfc4514 More info:
|
||||
// https://github.com/cert-manager/cert-manager/issues/3203 More
|
||||
// info: https://github.com/cert-manager/cert-manager/issues/4424
|
||||
// Cannot be set if the `subject` or `commonName` field is set.
|
||||
// This is an Alpha Feature and is only enabled with the
|
||||
// `--feature-gates=LiteralCertificateSubject=true` option set on
|
||||
// both the controller and webhook components.
|
||||
literalSubject?: string
|
||||
|
||||
// x.509 certificate NameConstraint extension which MUST NOT be
|
||||
// used in a non-CA certificate. More Info:
|
||||
// https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.10
|
||||
// This is an Alpha Feature and is only enabled with the
|
||||
// `--feature-gates=NameConstraints=true` option set on both the
|
||||
// controller and webhook components.
|
||||
nameConstraints?: {
|
||||
// if true then the name constraints are marked critical.
|
||||
critical?: bool
|
||||
|
||||
// Excluded contains the constraints which must be disallowed. Any
|
||||
// name matching a restriction in the excluded field is invalid
|
||||
// regardless of information appearing in the permitted
|
||||
excluded?: {
|
||||
// DNSDomains is a list of DNS domains that are permitted or
|
||||
// excluded.
|
||||
dnsDomains?: [...string]
|
||||
|
||||
// EmailAddresses is a list of Email Addresses that are permitted
|
||||
// or excluded.
|
||||
emailAddresses?: [...string]
|
||||
|
||||
// IPRanges is a list of IP Ranges that are permitted or excluded.
|
||||
// This should be a valid CIDR notation.
|
||||
ipRanges?: [...string]
|
||||
|
||||
// URIDomains is a list of URI domains that are permitted or
|
||||
// excluded.
|
||||
uriDomains?: [...string]
|
||||
}
|
||||
|
||||
// Permitted contains the constraints in which the names must be
|
||||
// located.
|
||||
permitted?: {
|
||||
// DNSDomains is a list of DNS domains that are permitted or
|
||||
// excluded.
|
||||
dnsDomains?: [...string]
|
||||
|
||||
// EmailAddresses is a list of Email Addresses that are permitted
|
||||
// or excluded.
|
||||
emailAddresses?: [...string]
|
||||
|
||||
// IPRanges is a list of IP Ranges that are permitted or excluded.
|
||||
// This should be a valid CIDR notation.
|
||||
ipRanges?: [...string]
|
||||
|
||||
// URIDomains is a list of URI domains that are permitted or
|
||||
// excluded.
|
||||
uriDomains?: [...string]
|
||||
}
|
||||
}
|
||||
|
||||
// `otherNames` is an escape hatch for SAN that allows any type.
|
||||
// We currently restrict the support to string like otherNames,
|
||||
// cf RFC 5280 p 37 Any UTF8 String valued otherName can be
|
||||
// passed with by setting the keys oid: x.x.x.x and UTF8Value:
|
||||
// somevalue for `otherName`. Most commonly this would be UPN set
|
||||
// with oid: 1.3.6.1.4.1.311.20.2.3 You should ensure that any
|
||||
// OID passed is valid for the UTF8String type as we do not
|
||||
// explicitly validate this.
|
||||
otherNames?: [...{
|
||||
// OID is the object identifier for the otherName SAN. The object
|
||||
// identifier must be expressed as a dotted string, for example,
|
||||
// "1.2.840.113556.1.4.221".
|
||||
oid?: string
|
||||
|
||||
// utf8Value is the string value of the otherName SAN. The
|
||||
// utf8Value accepts any valid UTF8 string to set as value for
|
||||
// the otherName SAN.
|
||||
utf8Value?: string
|
||||
}]
|
||||
|
||||
// Private key options. These include the key algorithm and size,
|
||||
// the used encoding and the rotation policy.
|
||||
privateKey?: {
|
||||
// Algorithm is the private key algorithm of the corresponding
|
||||
// private key for this certificate.
|
||||
// If provided, allowed values are either `RSA`, `ECDSA` or
|
||||
// `Ed25519`. If `algorithm` is specified and `size` is not
|
||||
// provided, key size of 2048 will be used for `RSA` key
|
||||
// algorithm and key size of 256 will be used for `ECDSA` key
|
||||
// algorithm. key size is ignored when using the `Ed25519` key
|
||||
// algorithm.
|
||||
algorithm?: "RSA" | "ECDSA" | "Ed25519"
|
||||
|
||||
// The private key cryptography standards (PKCS) encoding for this
|
||||
// certificate's private key to be encoded in.
|
||||
// If provided, allowed values are `PKCS1` and `PKCS8` standing
|
||||
// for PKCS#1 and PKCS#8, respectively. Defaults to `PKCS1` if
|
||||
// not specified.
|
||||
encoding?: "PKCS1" | "PKCS8"
|
||||
|
||||
// RotationPolicy controls how private keys should be regenerated
|
||||
// when a re-issuance is being processed.
|
||||
// If set to `Never`, a private key will only be generated if one
|
||||
// does not already exist in the target `spec.secretName`. If one
|
||||
// does exists but it does not have the correct algorithm or
|
||||
// size, a warning will be raised to await user intervention. If
|
||||
// set to `Always`, a private key matching the specified
|
||||
// requirements will be generated whenever a re-issuance occurs.
|
||||
// Default is `Never` for backward compatibility.
|
||||
rotationPolicy?: "Never" | "Always"
|
||||
|
||||
// Size is the key bit size of the corresponding private key for
|
||||
// this certificate.
|
||||
// If `algorithm` is set to `RSA`, valid values are `2048`, `4096`
|
||||
// or `8192`, and will default to `2048` if not specified. If
|
||||
// `algorithm` is set to `ECDSA`, valid values are `256`, `384`
|
||||
// or `521`, and will default to `256` if not specified. If
|
||||
// `algorithm` is set to `Ed25519`, Size is ignored. No other
|
||||
// values are allowed.
|
||||
size?: int
|
||||
}
|
||||
|
||||
// How long before the currently issued certificate's expiry
|
||||
// cert-manager should renew the certificate. For example, if a
|
||||
// certificate is valid for 60 minutes, and `renewBefore=10m`,
|
||||
// cert-manager will begin to attempt to renew the certificate 50
|
||||
// minutes after it was issued (i.e. when there are 10 minutes
|
||||
// remaining until the certificate is no longer valid).
|
||||
// NOTE: The actual lifetime of the issued certificate is used to
|
||||
// determine the renewal time. If an issuer returns a certificate
|
||||
// with a different lifetime than the one requested, cert-manager
|
||||
// will use the lifetime of the issued certificate.
|
||||
// If unset, this defaults to 1/3 of the issued certificate's
|
||||
// lifetime. Minimum accepted value is 5 minutes. Value must be
|
||||
// in units accepted by Go time.ParseDuration
|
||||
// https://golang.org/pkg/time/#ParseDuration.
|
||||
renewBefore?: string
|
||||
|
||||
// The maximum number of CertificateRequest revisions that are
|
||||
// maintained in the Certificate's history. Each revision
|
||||
// represents a single `CertificateRequest` created by this
|
||||
// Certificate, either when it was created, renewed, or Spec was
|
||||
// changed. Revisions will be removed by oldest first if the
|
||||
// number of revisions exceeds this number.
|
||||
// If set, revisionHistoryLimit must be a value of `1` or greater.
|
||||
// If unset (`nil`), revisions will not be garbage collected.
|
||||
// Default value is `nil`.
|
||||
revisionHistoryLimit?: int
|
||||
|
||||
// Name of the Secret resource that will be automatically created
|
||||
// and managed by this Certificate resource. It will be populated
|
||||
// with a private key and certificate, signed by the denoted
|
||||
// issuer. The Secret resource lives in the same namespace as the
|
||||
// Certificate resource.
|
||||
secretName: string
|
||||
|
||||
// Defines annotations and labels to be copied to the
|
||||
// Certificate's Secret. Labels and annotations on the Secret
|
||||
// will be changed as they appear on the SecretTemplate when
|
||||
// added or removed. SecretTemplate annotations are added in
|
||||
// conjunction with, and cannot overwrite, the base set of
|
||||
// annotations cert-manager sets on the Certificate's Secret.
|
||||
secretTemplate?: {
|
||||
// Annotations is a key value map to be copied to the target
|
||||
// Kubernetes Secret.
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Labels is a key value map to be copied to the target Kubernetes
|
||||
// Secret.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Requested set of X509 certificate subject attributes. More
|
||||
// info:
|
||||
// https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6
|
||||
// The common name attribute is specified separately in the
|
||||
// `commonName` field. Cannot be set if the `literalSubject`
|
||||
// field is set.
|
||||
subject?: {
|
||||
// Countries to be used on the Certificate.
|
||||
countries?: [...string]
|
||||
|
||||
// Cities to be used on the Certificate.
|
||||
localities?: [...string]
|
||||
|
||||
// Organizational Units to be used on the Certificate.
|
||||
organizationalUnits?: [...string]
|
||||
|
||||
// Organizations to be used on the Certificate.
|
||||
organizations?: [...string]
|
||||
|
||||
// Postal codes to be used on the Certificate.
|
||||
postalCodes?: [...string]
|
||||
|
||||
// State/Provinces to be used on the Certificate.
|
||||
provinces?: [...string]
|
||||
|
||||
// Serial number to be used on the Certificate.
|
||||
serialNumber?: string
|
||||
|
||||
// Street addresses to be used on the Certificate.
|
||||
streetAddresses?: [...string]
|
||||
}
|
||||
|
||||
// Requested URI subject alternative names.
|
||||
uris?: [...string]
|
||||
|
||||
// Requested key usages and extended key usages. These usages are
|
||||
// used to set the `usages` field on the created
|
||||
// CertificateRequest resources. If `encodeUsagesInRequest` is
|
||||
// unset or set to `true`, the usages will additionally be
|
||||
// encoded in the `request` field which contains the CSR blob.
|
||||
// If unset, defaults to `digital signature` and `key
|
||||
// encipherment`.
|
||||
usages?: [..."signing" | "digital signature" | "content commitment" | "key encipherment" | "key agreement" | "data encipherment" | "cert sign" | "crl sign" | "encipher only" | "decipher only" | "any" | "server auth" | "client auth" | "code signing" | "email protection" | "s/mime" | "ipsec end system" | "ipsec tunnel" | "ipsec user" | "timestamping" | "ocsp signing" | "microsoft sgc" | "netscape sgc"]
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-certmanager/prod-mesh-certmanager.gen.yaml
|
||||
|
||||
package v1
|
||||
|
||||
import "strings"
|
||||
|
||||
// A CertificateRequest is used to request a signed certificate
|
||||
// from one of the configured issuers.
|
||||
// All fields within the CertificateRequest's `spec` are immutable
|
||||
// after creation. A CertificateRequest will either succeed or
|
||||
// fail, as denoted by its `Ready` status condition and its
|
||||
// `status.failureTime` field.
|
||||
// A CertificateRequest is a one-shot resource, meaning it
|
||||
// represents a single point in time request for a certificate
|
||||
// and cannot be re-used.
|
||||
#CertificateRequest: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "cert-manager.io/v1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "CertificateRequest"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Specification of the desired state of the CertificateRequest
|
||||
// resource.
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
spec!: #CertificateRequestSpec
|
||||
}
|
||||
|
||||
// Specification of the desired state of the CertificateRequest
|
||||
// resource.
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
#CertificateRequestSpec: {
|
||||
// Requested 'duration' (i.e. lifetime) of the Certificate. Note
|
||||
// that the issuer may choose to ignore the requested duration,
|
||||
// just like any other requested attribute.
|
||||
duration?: string
|
||||
|
||||
// Extra contains extra attributes of the user that created the
|
||||
// CertificateRequest. Populated by the cert-manager webhook on
|
||||
// creation and immutable.
|
||||
extra?: {
|
||||
[string]: [...string]
|
||||
}
|
||||
|
||||
// Groups contains group membership of the user that created the
|
||||
// CertificateRequest. Populated by the cert-manager webhook on
|
||||
// creation and immutable.
|
||||
groups?: [...string]
|
||||
|
||||
// Requested basic constraints isCA value. Note that the issuer
|
||||
// may choose to ignore the requested isCA value, just like any
|
||||
// other requested attribute.
|
||||
// NOTE: If the CSR in the `Request` field has a BasicConstraints
|
||||
// extension, it must have the same isCA value as specified here.
|
||||
// If true, this will automatically add the `cert sign` usage to
|
||||
// the list of requested `usages`.
|
||||
isCA?: bool
|
||||
|
||||
// Reference to the issuer responsible for issuing the
|
||||
// certificate. If the issuer is namespace-scoped, it must be in
|
||||
// the same namespace as the Certificate. If the issuer is
|
||||
// cluster-scoped, it can be used from any namespace.
|
||||
// The `name` field of the reference must always be specified.
|
||||
issuerRef: {
|
||||
// Group of the resource being referred to.
|
||||
group?: string
|
||||
|
||||
// Kind of the resource being referred to.
|
||||
kind?: string
|
||||
|
||||
// Name of the resource being referred to.
|
||||
name: string
|
||||
}
|
||||
|
||||
// The PEM-encoded X.509 certificate signing request to be
|
||||
// submitted to the issuer for signing.
|
||||
// If the CSR has a BasicConstraints extension, its isCA attribute
|
||||
// must match the `isCA` value of this CertificateRequest. If the
|
||||
// CSR has a KeyUsage extension, its key usages must match the
|
||||
// key usages in the `usages` field of this CertificateRequest.
|
||||
// If the CSR has a ExtKeyUsage extension, its extended key
|
||||
// usages must match the extended key usages in the `usages`
|
||||
// field of this CertificateRequest.
|
||||
request: string
|
||||
|
||||
// UID contains the uid of the user that created the
|
||||
// CertificateRequest. Populated by the cert-manager webhook on
|
||||
// creation and immutable.
|
||||
uid?: string
|
||||
|
||||
// Requested key usages and extended key usages.
|
||||
// NOTE: If the CSR in the `Request` field has uses the KeyUsage
|
||||
// or ExtKeyUsage extension, these extensions must have the same
|
||||
// values as specified here without any additional values.
|
||||
// If unset, defaults to `digital signature` and `key
|
||||
// encipherment`.
|
||||
usages?: [..."signing" | "digital signature" | "content commitment" | "key encipherment" | "key agreement" | "data encipherment" | "cert sign" | "crl sign" | "encipher only" | "decipher only" | "any" | "server auth" | "client auth" | "code signing" | "email protection" | "s/mime" | "ipsec end system" | "ipsec tunnel" | "ipsec user" | "timestamping" | "ocsp signing" | "microsoft sgc" | "netscape sgc"]
|
||||
|
||||
// Username contains the name of the user that created the
|
||||
// CertificateRequest. Populated by the cert-manager webhook on
|
||||
// creation and immutable.
|
||||
username?: string
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
1589
docs/examples/cue.mod/gen/cert-manager.io/issuer/v1/types_gen.cue
Normal file
1589
docs/examples/cue.mod/gen/cert-manager.io/issuer/v1/types_gen.cue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,123 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"list"
|
||||
)
|
||||
|
||||
#WasmPlugin: {
|
||||
// Extend the functionality provided by the Istio proxy through
|
||||
// WebAssembly filters. See more details at:
|
||||
// https://istio.io/docs/reference/config/proxy_extensions/wasm-plugin.html
|
||||
spec!: #WasmPluginSpec
|
||||
apiVersion: "extensions.istio.io/v1alpha1"
|
||||
kind: "WasmPlugin"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Extend the functionality provided by the Istio proxy through
|
||||
// WebAssembly filters. See more details at:
|
||||
// https://istio.io/docs/reference/config/proxy_extensions/wasm-plugin.html
|
||||
#WasmPluginSpec: {
|
||||
// Specifies the failure behavior for the plugin due to fatal
|
||||
// errors.
|
||||
failStrategy?: "FAIL_CLOSE" | "FAIL_OPEN"
|
||||
|
||||
// The pull behaviour to be applied when fetching Wasm module by
|
||||
// either OCI image or http/https.
|
||||
imagePullPolicy?: "UNSPECIFIED_POLICY" | "IfNotPresent" | "Always"
|
||||
|
||||
// Credentials to use for OCI image pulling.
|
||||
imagePullSecret?: strings.MaxRunes(253) & strings.MinRunes(1)
|
||||
|
||||
// Specifies the criteria to determine which traffic is passed to
|
||||
// WasmPlugin.
|
||||
match?: [...{
|
||||
// Criteria for selecting traffic by their direction.
|
||||
mode?: "UNDEFINED" | "CLIENT" | "SERVER" | "CLIENT_AND_SERVER"
|
||||
|
||||
// Criteria for selecting traffic by their destination port.
|
||||
ports?: [...{
|
||||
number: uint16 & >=1
|
||||
}]
|
||||
}]
|
||||
|
||||
// Determines where in the filter chain this `WasmPlugin` is to be
|
||||
// injected.
|
||||
phase?: "UNSPECIFIED_PHASE" | "AUTHN" | "AUTHZ" | "STATS"
|
||||
|
||||
// The configuration that will be passed on to the plugin.
|
||||
pluginConfig?: {
|
||||
...
|
||||
}
|
||||
|
||||
// The plugin name to be used in the Envoy configuration (used to
|
||||
// be called `rootID`).
|
||||
pluginName?: strings.MaxRunes(256) & strings.MinRunes(1)
|
||||
|
||||
// Determines ordering of `WasmPlugins` in the same `phase`.
|
||||
priority?: null | int
|
||||
selector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which a policy should be applied.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// SHA256 checksum that will be used to verify Wasm module or OCI
|
||||
// container.
|
||||
sha256?: =~"(^$|^[a-f0-9]{64}$)"
|
||||
|
||||
// Optional.
|
||||
targetRef?: {
|
||||
// group is the group of the target resource.
|
||||
group?: string
|
||||
|
||||
// kind is kind of the target resource.
|
||||
kind?: string
|
||||
|
||||
// name is the name of the target resource.
|
||||
name?: string
|
||||
|
||||
// namespace is the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// Specifies the type of Wasm Extension to be used.
|
||||
type?: "UNSPECIFIED_PLUGIN_TYPE" | "HTTP" | "NETWORK"
|
||||
|
||||
// URL of a Wasm module or OCI container.
|
||||
url: strings.MinRunes(1)
|
||||
verificationKey?: string
|
||||
vmConfig?: {
|
||||
// Specifies environment variables to be injected to this VM.
|
||||
env?: list.MaxItems(256) & [...{
|
||||
// Name of the environment variable.
|
||||
name: strings.MaxRunes(256) & strings.MinRunes(1)
|
||||
|
||||
// Value for the environment variable.
|
||||
value?: strings.MaxRunes(2048)
|
||||
|
||||
// Source for the environment variable's value.
|
||||
valueFrom?: "INLINE" | "HOST"
|
||||
}]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// BuildPlan is the primary interface between CUE and the Holos cli.
|
||||
#BuildPlan: {
|
||||
#TypeMeta
|
||||
|
||||
// Metadata represents the holos component name
|
||||
metadata?: #ObjectMeta @go(Metadata)
|
||||
spec?: #BuildPlanSpec @go(Spec)
|
||||
}
|
||||
|
||||
#BuildPlanSpec: {
|
||||
disabled?: bool @go(Disabled)
|
||||
components?: #BuildPlanComponents @go(Components)
|
||||
}
|
||||
|
||||
#BuildPlanComponents: {
|
||||
helmCharts?: [...#HelmChart] @go(HelmCharts,[]HelmChart)
|
||||
kubernetesObjects?: [...#KubernetesObjects] @go(KubernetesObjects,[]KubernetesObjects)
|
||||
kustomizeBuilds?: [...#KustomizeBuild] @go(KustomizeBuilds,[]KustomizeBuild)
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// HolosComponent defines the fields common to all holos component kinds including the Render Result.
|
||||
#HolosComponent: {
|
||||
#TypeMeta
|
||||
|
||||
// Metadata represents the holos component name
|
||||
metadata?: #ObjectMeta @go(Metadata)
|
||||
|
||||
// APIObjectMap holds the marshalled representation of api objects. Think of
|
||||
// these as resources overlaid at the back of the render pipeline.
|
||||
apiObjectMap?: #APIObjectMap @go(APIObjectMap)
|
||||
|
||||
#Kustomization
|
||||
|
||||
#Kustomize
|
||||
|
||||
// Skip causes holos to take no action regarding the component.
|
||||
Skip: bool
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#APIVersion: "holos.run/v1alpha1"
|
||||
#BuildPlanKind: "BuildPlan"
|
||||
#HelmChartKind: "HelmChart"
|
||||
|
||||
// ChartDir is the directory name created in the holos component directory to cache a chart.
|
||||
#ChartDir: "vendor"
|
||||
|
||||
// ResourcesFile is the file name used to store component output when post processing with kustomize.
|
||||
#ResourcesFile: "resources.yaml"
|
||||
@@ -0,0 +1,6 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
// Package v1alpha1 defines the api boundary between CUE and Holos.
|
||||
package v1alpha1
|
||||
@@ -0,0 +1,28 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// A HelmChart represents a helm command to provide chart values in order to render kubernetes api objects.
|
||||
#HelmChart: {
|
||||
#HolosComponent
|
||||
|
||||
// Namespace is the namespace to install into. TODO: Use metadata.namespace instead.
|
||||
namespace: string @go(Namespace)
|
||||
chart: #Chart @go(Chart)
|
||||
valuesContent: string @go(ValuesContent)
|
||||
enableHooks: bool @go(EnableHooks)
|
||||
}
|
||||
|
||||
#Chart: {
|
||||
name: string @go(Name)
|
||||
version: string @go(Version)
|
||||
release: string @go(Release)
|
||||
repository?: #Repository @go(Repository)
|
||||
}
|
||||
|
||||
#Repository: {
|
||||
name: string @go(Name)
|
||||
url: string @go(URL)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#KubernetesObjectsKind: "KubernetesObjects"
|
||||
|
||||
// KubernetesObjects represents CUE output which directly provides Kubernetes api objects to holos.
|
||||
#KubernetesObjects: {
|
||||
#HolosComponent
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// Kustomization holds the rendered flux kustomization api object content for git ops.
|
||||
#Kustomization: {
|
||||
// KsContent is the yaml representation of the flux kustomization for gitops.
|
||||
ksContent?: string @go(KsContent)
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#KustomizeBuildKind: "KustomizeBuild"
|
||||
|
||||
// Kustomize represents resources necessary to execute a kustomize build.
|
||||
// Intended for at least two use cases:
|
||||
//
|
||||
// 1. Process raw yaml file resources in a holos component directory.
|
||||
// 2. Post process a HelmChart to inject istio, add custom labels, etc...
|
||||
#Kustomize: {
|
||||
// KustomizeFiles holds file contents for kustomize, e.g. patch files.
|
||||
kustomizeFiles?: #FileContentMap @go(KustomizeFiles)
|
||||
|
||||
// ResourcesFile is the file name used for api objects in kustomization.yaml
|
||||
resourcesFile?: string @go(ResourcesFile)
|
||||
}
|
||||
|
||||
// KustomizeBuild renders plain yaml files in the holos component directory using kubectl kustomize build.
|
||||
#KustomizeBuild: {
|
||||
#HolosComponent
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#KustomizeBuildKind: "KustomizeBuild"
|
||||
|
||||
// KustomizeBuild
|
||||
#KustomizeBuild: {
|
||||
#HolosComponent
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// APIObjectMap is the shape of marshalled api objects returned from cue to the
|
||||
// holos cli. A map is used to improve the clarity of error messages from cue.
|
||||
#APIObjectMap: {[string]: [string]: string}
|
||||
|
||||
// FileContentMap is a map of file names to file contents.
|
||||
#FileContentMap: {[string]: string}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// ObjectMeta represents metadata of a holos component object. The fields are a
|
||||
// copy of upstream kubernetes api machinery but are by holos objects distinct
|
||||
// from kubernetes api objects.
|
||||
#ObjectMeta: {
|
||||
// Name uniquely identifies the holos component instance and must be suitable as a file name.
|
||||
name?: string @go(Name)
|
||||
|
||||
// Namespace confines a holos component to a single namespace via kustomize if set.
|
||||
namespace?: string @go(Namespace)
|
||||
|
||||
// Labels are not used but are copied from api machinery ObjectMeta for completeness.
|
||||
labels?: {[string]: string} @go(Labels,map[string]string)
|
||||
|
||||
// Annotations are not used but are copied from api machinery ObjectMeta for completeness.
|
||||
annotations?: {[string]: string} @go(Annotations,map[string]string)
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#Renderer: _
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// Result is the build result for display or writing. Holos components Render the Result as a data pipeline.
|
||||
#Result: {
|
||||
HolosComponent: #HolosComponent
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go github.com/holos-run/holos/api/v1alpha1
|
||||
|
||||
package v1alpha1
|
||||
|
||||
#TypeMeta: {
|
||||
kind?: string @go(Kind)
|
||||
apiVersion?: string @go(APIVersion)
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
#IstioOperator: {
|
||||
apiVersion: "install.istio.io/v1alpha1"
|
||||
kind: "IstioOperator"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
...
|
||||
}
|
||||
@@ -3066,7 +3066,7 @@ import (
|
||||
// If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
|
||||
// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
|
||||
// +optional
|
||||
securityContext?: null | #SecurityContext @go(SecurityContext,*SecurityContext) @protobuf(15,bytes,opt)
|
||||
securityContext?: #SecurityContext @go(SecurityContext,*SecurityContext) @protobuf(15,bytes,opt)
|
||||
|
||||
// Whether this container should allocate a buffer for stdin in the container runtime. If this
|
||||
// is not set, reads from stdin in the container will always result in EOF.
|
||||
@@ -3982,7 +3982,7 @@ import (
|
||||
// SecurityContext holds pod-level security attributes and common container settings.
|
||||
// Optional: Defaults to empty. See type description for default values of each field.
|
||||
// +optional
|
||||
securityContext?: null | #PodSecurityContext @go(SecurityContext,*PodSecurityContext) @protobuf(14,bytes,opt)
|
||||
securityContext?: #PodSecurityContext @go(SecurityContext,*PodSecurityContext) @protobuf(14,bytes,opt)
|
||||
|
||||
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
|
||||
// If specified, these secrets will be passed to individual puller implementations for them to use.
|
||||
|
||||
@@ -0,0 +1,967 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import "strings"
|
||||
|
||||
#DestinationRule: {
|
||||
// Configuration affecting load balancing, outlier detection, etc.
|
||||
// See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/destination-rule.html
|
||||
spec!: #DestinationRuleSpec
|
||||
apiVersion: "networking.istio.io/v1alpha3"
|
||||
kind: "DestinationRule"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting load balancing, outlier detection, etc.
|
||||
// See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/destination-rule.html
|
||||
#DestinationRuleSpec: {
|
||||
// A list of namespaces to which this destination rule is
|
||||
// exported.
|
||||
exportTo?: [...string]
|
||||
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
|
||||
// One or more named sets that represent individual versions of a
|
||||
// service.
|
||||
subsets?: [...{
|
||||
// Labels apply a filter over the endpoints of a service in the
|
||||
// service registry.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Name of the subset.
|
||||
name: string
|
||||
|
||||
// Traffic policies that apply to this subset.
|
||||
trafficPolicy?: {
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings controlling the load balancer algorithms.
|
||||
loadBalancer?: ({} | {
|
||||
simple: _
|
||||
} | {
|
||||
consistentHash: _
|
||||
}) & {
|
||||
consistentHash?: ({} | {
|
||||
httpHeaderName: _
|
||||
} | {
|
||||
httpCookie: _
|
||||
} | {
|
||||
useSourceIp: _
|
||||
} | {
|
||||
httpQueryParameterName: _
|
||||
}) & ({} | {
|
||||
ringHash: _
|
||||
} | {
|
||||
maglev: _
|
||||
}) & {
|
||||
// Hash based on HTTP cookie.
|
||||
httpCookie?: {
|
||||
// Name of the cookie.
|
||||
name: string
|
||||
|
||||
// Path to set for the cookie.
|
||||
path?: string
|
||||
|
||||
// Lifetime of the cookie.
|
||||
ttl?: string
|
||||
}
|
||||
|
||||
// Hash based on a specific HTTP header.
|
||||
httpHeaderName?: string
|
||||
|
||||
// Hash based on a specific HTTP query parameter.
|
||||
httpQueryParameterName?: string
|
||||
maglev?: {
|
||||
// The table size for Maglev hashing.
|
||||
tableSize?: int
|
||||
}
|
||||
|
||||
// Deprecated.
|
||||
minimumRingSize?: int
|
||||
ringHash?: {
|
||||
// The minimum number of virtual nodes to use for the hash ring.
|
||||
minimumRingSize?: int
|
||||
}
|
||||
|
||||
// Hash based on the source IP address.
|
||||
useSourceIp?: bool
|
||||
}
|
||||
localityLbSetting?: {
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
distribute?: [...{
|
||||
// Originating locality, '/' separated, e.g.
|
||||
from?: string
|
||||
|
||||
// Map of upstream localities to traffic distribution weights.
|
||||
to?: {
|
||||
[string]: int
|
||||
}
|
||||
}]
|
||||
|
||||
// enable locality load balancing, this is DestinationRule-level
|
||||
// and will override mesh wide settings in entirety.
|
||||
enabled?: null | bool
|
||||
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
failover?: [...{
|
||||
// Originating region.
|
||||
from?: string
|
||||
|
||||
// Destination region the traffic will fail over to when endpoints
|
||||
// in the 'from' region becomes unhealthy.
|
||||
to?: string
|
||||
}]
|
||||
|
||||
// failoverPriority is an ordered list of labels used to sort
|
||||
// endpoints to do priority based load balancing.
|
||||
failoverPriority?: [...string]
|
||||
}
|
||||
simple?: "UNSPECIFIED" | "LEAST_CONN" | "RANDOM" | "PASSTHROUGH" | "ROUND_ROBIN" | "LEAST_REQUEST"
|
||||
|
||||
// Represents the warmup duration of Service.
|
||||
warmupDurationSecs?: string
|
||||
}
|
||||
outlierDetection?: {
|
||||
// Minimum ejection duration.
|
||||
baseEjectionTime?: string
|
||||
|
||||
// Number of 5xx errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutive5xxErrors?: null | int
|
||||
consecutiveErrors?: int
|
||||
|
||||
// Number of gateway errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutiveGatewayErrors?: null | int
|
||||
|
||||
// The number of consecutive locally originated failures before
|
||||
// ejection occurs.
|
||||
consecutiveLocalOriginFailures?: null | int
|
||||
|
||||
// Time interval between ejection sweep analysis.
|
||||
interval?: string
|
||||
|
||||
// Maximum % of hosts in the load balancing pool for the upstream
|
||||
// service that can be ejected.
|
||||
maxEjectionPercent?: int
|
||||
|
||||
// Outlier detection will be enabled as long as the associated
|
||||
// load balancing pool has at least min_health_percent hosts in
|
||||
// healthy mode.
|
||||
minHealthPercent?: int
|
||||
|
||||
// Determines whether to distinguish local origin failures from
|
||||
// external errors.
|
||||
splitExternalLocalOriginErrors?: bool
|
||||
}
|
||||
|
||||
// Traffic policies specific to individual ports.
|
||||
portLevelSettings?: [...{
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings controlling the load balancer algorithms.
|
||||
loadBalancer?: ({} | {
|
||||
simple: _
|
||||
} | {
|
||||
consistentHash: _
|
||||
}) & {
|
||||
consistentHash?: ({} | {
|
||||
httpHeaderName: _
|
||||
} | {
|
||||
httpCookie: _
|
||||
} | {
|
||||
useSourceIp: _
|
||||
} | {
|
||||
httpQueryParameterName: _
|
||||
}) & ({} | {
|
||||
ringHash: _
|
||||
} | {
|
||||
maglev: _
|
||||
}) & {
|
||||
// Hash based on HTTP cookie.
|
||||
httpCookie?: {
|
||||
// Name of the cookie.
|
||||
name: string
|
||||
|
||||
// Path to set for the cookie.
|
||||
path?: string
|
||||
|
||||
// Lifetime of the cookie.
|
||||
ttl?: string
|
||||
}
|
||||
|
||||
// Hash based on a specific HTTP header.
|
||||
httpHeaderName?: string
|
||||
|
||||
// Hash based on a specific HTTP query parameter.
|
||||
httpQueryParameterName?: string
|
||||
maglev?: {
|
||||
// The table size for Maglev hashing.
|
||||
tableSize?: int
|
||||
}
|
||||
|
||||
// Deprecated.
|
||||
minimumRingSize?: int
|
||||
ringHash?: {
|
||||
// The minimum number of virtual nodes to use for the hash ring.
|
||||
minimumRingSize?: int
|
||||
}
|
||||
|
||||
// Hash based on the source IP address.
|
||||
useSourceIp?: bool
|
||||
}
|
||||
localityLbSetting?: {
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
distribute?: [...{
|
||||
// Originating locality, '/' separated, e.g.
|
||||
from?: string
|
||||
|
||||
// Map of upstream localities to traffic distribution weights.
|
||||
to?: {
|
||||
[string]: int
|
||||
}
|
||||
}]
|
||||
|
||||
// enable locality load balancing, this is DestinationRule-level
|
||||
// and will override mesh wide settings in entirety.
|
||||
enabled?: null | bool
|
||||
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
failover?: [...{
|
||||
// Originating region.
|
||||
from?: string
|
||||
|
||||
// Destination region the traffic will fail over to when endpoints
|
||||
// in the 'from' region becomes unhealthy.
|
||||
to?: string
|
||||
}]
|
||||
|
||||
// failoverPriority is an ordered list of labels used to sort
|
||||
// endpoints to do priority based load balancing.
|
||||
failoverPriority?: [...string]
|
||||
}
|
||||
simple?: "UNSPECIFIED" | "LEAST_CONN" | "RANDOM" | "PASSTHROUGH" | "ROUND_ROBIN" | "LEAST_REQUEST"
|
||||
|
||||
// Represents the warmup duration of Service.
|
||||
warmupDurationSecs?: string
|
||||
}
|
||||
outlierDetection?: {
|
||||
// Minimum ejection duration.
|
||||
baseEjectionTime?: string
|
||||
|
||||
// Number of 5xx errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutive5xxErrors?: null | int
|
||||
consecutiveErrors?: int
|
||||
|
||||
// Number of gateway errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutiveGatewayErrors?: null | int
|
||||
|
||||
// The number of consecutive locally originated failures before
|
||||
// ejection occurs.
|
||||
consecutiveLocalOriginFailures?: null | int
|
||||
|
||||
// Time interval between ejection sweep analysis.
|
||||
interval?: string
|
||||
|
||||
// Maximum % of hosts in the load balancing pool for the upstream
|
||||
// service that can be ejected.
|
||||
maxEjectionPercent?: int
|
||||
|
||||
// Outlier detection will be enabled as long as the associated
|
||||
// load balancing pool has at least min_health_percent hosts in
|
||||
// healthy mode.
|
||||
minHealthPercent?: int
|
||||
|
||||
// Determines whether to distinguish local origin failures from
|
||||
// external errors.
|
||||
splitExternalLocalOriginErrors?: bool
|
||||
}
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
tls?: {
|
||||
// OPTIONAL: The path to the file containing certificate authority
|
||||
// certificates to use in verifying a presented server
|
||||
// certificate.
|
||||
caCertificates?: string
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
clientCertificate?: string
|
||||
|
||||
// The name of the secret that holds the TLS certs for the client
|
||||
// including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// `insecureSkipVerify` specifies whether the proxy should skip
|
||||
// verifying the CA signature and SAN for the server certificate
|
||||
// corresponding to the host.
|
||||
insecureSkipVerify?: null | bool
|
||||
|
||||
// Indicates whether connections to this port should be secured
|
||||
// using TLS.
|
||||
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// SNI string to present to the server during TLS handshake.
|
||||
sni?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate.
|
||||
subjectAltNames?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
tls?: {
|
||||
// OPTIONAL: The path to the file containing certificate authority
|
||||
// certificates to use in verifying a presented server
|
||||
// certificate.
|
||||
caCertificates?: string
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
clientCertificate?: string
|
||||
|
||||
// The name of the secret that holds the TLS certs for the client
|
||||
// including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// `insecureSkipVerify` specifies whether the proxy should skip
|
||||
// verifying the CA signature and SAN for the server certificate
|
||||
// corresponding to the host.
|
||||
insecureSkipVerify?: null | bool
|
||||
|
||||
// Indicates whether connections to this port should be secured
|
||||
// using TLS.
|
||||
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// SNI string to present to the server during TLS handshake.
|
||||
sni?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate.
|
||||
subjectAltNames?: [...string]
|
||||
}
|
||||
|
||||
// Configuration of tunneling TCP over other transport or
|
||||
// application layers for the host configured in the
|
||||
// DestinationRule.
|
||||
tunnel?: {
|
||||
// Specifies which protocol to use for tunneling the downstream
|
||||
// connection.
|
||||
protocol?: string
|
||||
|
||||
// Specifies a host to which the downstream connection is
|
||||
// tunneled.
|
||||
targetHost: string
|
||||
|
||||
// Specifies a port to which the downstream connection is
|
||||
// tunneled.
|
||||
targetPort: int
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// Traffic policies to apply (load balancing policy, connection
|
||||
// pool sizes, outlier detection).
|
||||
trafficPolicy?: {
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings controlling the load balancer algorithms.
|
||||
loadBalancer?: ({} | {
|
||||
simple: _
|
||||
} | {
|
||||
consistentHash: _
|
||||
}) & {
|
||||
consistentHash?: ({} | {
|
||||
httpHeaderName: _
|
||||
} | {
|
||||
httpCookie: _
|
||||
} | {
|
||||
useSourceIp: _
|
||||
} | {
|
||||
httpQueryParameterName: _
|
||||
}) & ({} | {
|
||||
ringHash: _
|
||||
} | {
|
||||
maglev: _
|
||||
}) & {
|
||||
// Hash based on HTTP cookie.
|
||||
httpCookie?: {
|
||||
// Name of the cookie.
|
||||
name: string
|
||||
|
||||
// Path to set for the cookie.
|
||||
path?: string
|
||||
|
||||
// Lifetime of the cookie.
|
||||
ttl?: string
|
||||
}
|
||||
|
||||
// Hash based on a specific HTTP header.
|
||||
httpHeaderName?: string
|
||||
|
||||
// Hash based on a specific HTTP query parameter.
|
||||
httpQueryParameterName?: string
|
||||
maglev?: {
|
||||
// The table size for Maglev hashing.
|
||||
tableSize?: int
|
||||
}
|
||||
|
||||
// Deprecated.
|
||||
minimumRingSize?: int
|
||||
ringHash?: {
|
||||
// The minimum number of virtual nodes to use for the hash ring.
|
||||
minimumRingSize?: int
|
||||
}
|
||||
|
||||
// Hash based on the source IP address.
|
||||
useSourceIp?: bool
|
||||
}
|
||||
localityLbSetting?: {
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
distribute?: [...{
|
||||
// Originating locality, '/' separated, e.g.
|
||||
from?: string
|
||||
|
||||
// Map of upstream localities to traffic distribution weights.
|
||||
to?: {
|
||||
[string]: int
|
||||
}
|
||||
}]
|
||||
|
||||
// enable locality load balancing, this is DestinationRule-level
|
||||
// and will override mesh wide settings in entirety.
|
||||
enabled?: null | bool
|
||||
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
failover?: [...{
|
||||
// Originating region.
|
||||
from?: string
|
||||
|
||||
// Destination region the traffic will fail over to when endpoints
|
||||
// in the 'from' region becomes unhealthy.
|
||||
to?: string
|
||||
}]
|
||||
|
||||
// failoverPriority is an ordered list of labels used to sort
|
||||
// endpoints to do priority based load balancing.
|
||||
failoverPriority?: [...string]
|
||||
}
|
||||
simple?: "UNSPECIFIED" | "LEAST_CONN" | "RANDOM" | "PASSTHROUGH" | "ROUND_ROBIN" | "LEAST_REQUEST"
|
||||
|
||||
// Represents the warmup duration of Service.
|
||||
warmupDurationSecs?: string
|
||||
}
|
||||
outlierDetection?: {
|
||||
// Minimum ejection duration.
|
||||
baseEjectionTime?: string
|
||||
|
||||
// Number of 5xx errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutive5xxErrors?: null | int
|
||||
consecutiveErrors?: int
|
||||
|
||||
// Number of gateway errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutiveGatewayErrors?: null | int
|
||||
|
||||
// The number of consecutive locally originated failures before
|
||||
// ejection occurs.
|
||||
consecutiveLocalOriginFailures?: null | int
|
||||
|
||||
// Time interval between ejection sweep analysis.
|
||||
interval?: string
|
||||
|
||||
// Maximum % of hosts in the load balancing pool for the upstream
|
||||
// service that can be ejected.
|
||||
maxEjectionPercent?: int
|
||||
|
||||
// Outlier detection will be enabled as long as the associated
|
||||
// load balancing pool has at least min_health_percent hosts in
|
||||
// healthy mode.
|
||||
minHealthPercent?: int
|
||||
|
||||
// Determines whether to distinguish local origin failures from
|
||||
// external errors.
|
||||
splitExternalLocalOriginErrors?: bool
|
||||
}
|
||||
|
||||
// Traffic policies specific to individual ports.
|
||||
portLevelSettings?: [...{
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings controlling the load balancer algorithms.
|
||||
loadBalancer?: ({} | {
|
||||
simple: _
|
||||
} | {
|
||||
consistentHash: _
|
||||
}) & {
|
||||
consistentHash?: ({} | {
|
||||
httpHeaderName: _
|
||||
} | {
|
||||
httpCookie: _
|
||||
} | {
|
||||
useSourceIp: _
|
||||
} | {
|
||||
httpQueryParameterName: _
|
||||
}) & ({} | {
|
||||
ringHash: _
|
||||
} | {
|
||||
maglev: _
|
||||
}) & {
|
||||
// Hash based on HTTP cookie.
|
||||
httpCookie?: {
|
||||
// Name of the cookie.
|
||||
name: string
|
||||
|
||||
// Path to set for the cookie.
|
||||
path?: string
|
||||
|
||||
// Lifetime of the cookie.
|
||||
ttl?: string
|
||||
}
|
||||
|
||||
// Hash based on a specific HTTP header.
|
||||
httpHeaderName?: string
|
||||
|
||||
// Hash based on a specific HTTP query parameter.
|
||||
httpQueryParameterName?: string
|
||||
maglev?: {
|
||||
// The table size for Maglev hashing.
|
||||
tableSize?: int
|
||||
}
|
||||
|
||||
// Deprecated.
|
||||
minimumRingSize?: int
|
||||
ringHash?: {
|
||||
// The minimum number of virtual nodes to use for the hash ring.
|
||||
minimumRingSize?: int
|
||||
}
|
||||
|
||||
// Hash based on the source IP address.
|
||||
useSourceIp?: bool
|
||||
}
|
||||
localityLbSetting?: {
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
distribute?: [...{
|
||||
// Originating locality, '/' separated, e.g.
|
||||
from?: string
|
||||
|
||||
// Map of upstream localities to traffic distribution weights.
|
||||
to?: {
|
||||
[string]: int
|
||||
}
|
||||
}]
|
||||
|
||||
// enable locality load balancing, this is DestinationRule-level
|
||||
// and will override mesh wide settings in entirety.
|
||||
enabled?: null | bool
|
||||
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
failover?: [...{
|
||||
// Originating region.
|
||||
from?: string
|
||||
|
||||
// Destination region the traffic will fail over to when endpoints
|
||||
// in the 'from' region becomes unhealthy.
|
||||
to?: string
|
||||
}]
|
||||
|
||||
// failoverPriority is an ordered list of labels used to sort
|
||||
// endpoints to do priority based load balancing.
|
||||
failoverPriority?: [...string]
|
||||
}
|
||||
simple?: "UNSPECIFIED" | "LEAST_CONN" | "RANDOM" | "PASSTHROUGH" | "ROUND_ROBIN" | "LEAST_REQUEST"
|
||||
|
||||
// Represents the warmup duration of Service.
|
||||
warmupDurationSecs?: string
|
||||
}
|
||||
outlierDetection?: {
|
||||
// Minimum ejection duration.
|
||||
baseEjectionTime?: string
|
||||
|
||||
// Number of 5xx errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutive5xxErrors?: null | int
|
||||
consecutiveErrors?: int
|
||||
|
||||
// Number of gateway errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutiveGatewayErrors?: null | int
|
||||
|
||||
// The number of consecutive locally originated failures before
|
||||
// ejection occurs.
|
||||
consecutiveLocalOriginFailures?: null | int
|
||||
|
||||
// Time interval between ejection sweep analysis.
|
||||
interval?: string
|
||||
|
||||
// Maximum % of hosts in the load balancing pool for the upstream
|
||||
// service that can be ejected.
|
||||
maxEjectionPercent?: int
|
||||
|
||||
// Outlier detection will be enabled as long as the associated
|
||||
// load balancing pool has at least min_health_percent hosts in
|
||||
// healthy mode.
|
||||
minHealthPercent?: int
|
||||
|
||||
// Determines whether to distinguish local origin failures from
|
||||
// external errors.
|
||||
splitExternalLocalOriginErrors?: bool
|
||||
}
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
tls?: {
|
||||
// OPTIONAL: The path to the file containing certificate authority
|
||||
// certificates to use in verifying a presented server
|
||||
// certificate.
|
||||
caCertificates?: string
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
clientCertificate?: string
|
||||
|
||||
// The name of the secret that holds the TLS certs for the client
|
||||
// including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// `insecureSkipVerify` specifies whether the proxy should skip
|
||||
// verifying the CA signature and SAN for the server certificate
|
||||
// corresponding to the host.
|
||||
insecureSkipVerify?: null | bool
|
||||
|
||||
// Indicates whether connections to this port should be secured
|
||||
// using TLS.
|
||||
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// SNI string to present to the server during TLS handshake.
|
||||
sni?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate.
|
||||
subjectAltNames?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
tls?: {
|
||||
// OPTIONAL: The path to the file containing certificate authority
|
||||
// certificates to use in verifying a presented server
|
||||
// certificate.
|
||||
caCertificates?: string
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
clientCertificate?: string
|
||||
|
||||
// The name of the secret that holds the TLS certs for the client
|
||||
// including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// `insecureSkipVerify` specifies whether the proxy should skip
|
||||
// verifying the CA signature and SAN for the server certificate
|
||||
// corresponding to the host.
|
||||
insecureSkipVerify?: null | bool
|
||||
|
||||
// Indicates whether connections to this port should be secured
|
||||
// using TLS.
|
||||
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// SNI string to present to the server during TLS handshake.
|
||||
sni?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate.
|
||||
subjectAltNames?: [...string]
|
||||
}
|
||||
|
||||
// Configuration of tunneling TCP over other transport or
|
||||
// application layers for the host configured in the
|
||||
// DestinationRule.
|
||||
tunnel?: {
|
||||
// Specifies which protocol to use for tunneling the downstream
|
||||
// connection.
|
||||
protocol?: string
|
||||
|
||||
// Specifies a host to which the downstream connection is
|
||||
// tunneled.
|
||||
targetHost: string
|
||||
|
||||
// Specifies a port to which the downstream connection is
|
||||
// tunneled.
|
||||
targetPort: int
|
||||
}
|
||||
}
|
||||
workloadSelector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which a policy should be applied.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,967 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#DestinationRule: {
|
||||
// Configuration affecting load balancing, outlier detection, etc.
|
||||
// See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/destination-rule.html
|
||||
spec!: #DestinationRuleSpec
|
||||
apiVersion: "networking.istio.io/v1beta1"
|
||||
kind: "DestinationRule"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting load balancing, outlier detection, etc.
|
||||
// See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/destination-rule.html
|
||||
#DestinationRuleSpec: {
|
||||
// A list of namespaces to which this destination rule is
|
||||
// exported.
|
||||
exportTo?: [...string]
|
||||
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
|
||||
// One or more named sets that represent individual versions of a
|
||||
// service.
|
||||
subsets?: [...{
|
||||
// Labels apply a filter over the endpoints of a service in the
|
||||
// service registry.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Name of the subset.
|
||||
name: string
|
||||
|
||||
// Traffic policies that apply to this subset.
|
||||
trafficPolicy?: {
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings controlling the load balancer algorithms.
|
||||
loadBalancer?: ({} | {
|
||||
simple: _
|
||||
} | {
|
||||
consistentHash: _
|
||||
}) & {
|
||||
consistentHash?: ({} | {
|
||||
httpHeaderName: _
|
||||
} | {
|
||||
httpCookie: _
|
||||
} | {
|
||||
useSourceIp: _
|
||||
} | {
|
||||
httpQueryParameterName: _
|
||||
}) & ({} | {
|
||||
ringHash: _
|
||||
} | {
|
||||
maglev: _
|
||||
}) & {
|
||||
// Hash based on HTTP cookie.
|
||||
httpCookie?: {
|
||||
// Name of the cookie.
|
||||
name: string
|
||||
|
||||
// Path to set for the cookie.
|
||||
path?: string
|
||||
|
||||
// Lifetime of the cookie.
|
||||
ttl?: string
|
||||
}
|
||||
|
||||
// Hash based on a specific HTTP header.
|
||||
httpHeaderName?: string
|
||||
|
||||
// Hash based on a specific HTTP query parameter.
|
||||
httpQueryParameterName?: string
|
||||
maglev?: {
|
||||
// The table size for Maglev hashing.
|
||||
tableSize?: int
|
||||
}
|
||||
|
||||
// Deprecated.
|
||||
minimumRingSize?: int
|
||||
ringHash?: {
|
||||
// The minimum number of virtual nodes to use for the hash ring.
|
||||
minimumRingSize?: int
|
||||
}
|
||||
|
||||
// Hash based on the source IP address.
|
||||
useSourceIp?: bool
|
||||
}
|
||||
localityLbSetting?: {
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
distribute?: [...{
|
||||
// Originating locality, '/' separated, e.g.
|
||||
from?: string
|
||||
|
||||
// Map of upstream localities to traffic distribution weights.
|
||||
to?: {
|
||||
[string]: int
|
||||
}
|
||||
}]
|
||||
|
||||
// enable locality load balancing, this is DestinationRule-level
|
||||
// and will override mesh wide settings in entirety.
|
||||
enabled?: null | bool
|
||||
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
failover?: [...{
|
||||
// Originating region.
|
||||
from?: string
|
||||
|
||||
// Destination region the traffic will fail over to when endpoints
|
||||
// in the 'from' region becomes unhealthy.
|
||||
to?: string
|
||||
}]
|
||||
|
||||
// failoverPriority is an ordered list of labels used to sort
|
||||
// endpoints to do priority based load balancing.
|
||||
failoverPriority?: [...string]
|
||||
}
|
||||
simple?: "UNSPECIFIED" | "LEAST_CONN" | "RANDOM" | "PASSTHROUGH" | "ROUND_ROBIN" | "LEAST_REQUEST"
|
||||
|
||||
// Represents the warmup duration of Service.
|
||||
warmupDurationSecs?: string
|
||||
}
|
||||
outlierDetection?: {
|
||||
// Minimum ejection duration.
|
||||
baseEjectionTime?: string
|
||||
|
||||
// Number of 5xx errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutive5xxErrors?: null | int
|
||||
consecutiveErrors?: int
|
||||
|
||||
// Number of gateway errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutiveGatewayErrors?: null | int
|
||||
|
||||
// The number of consecutive locally originated failures before
|
||||
// ejection occurs.
|
||||
consecutiveLocalOriginFailures?: null | int
|
||||
|
||||
// Time interval between ejection sweep analysis.
|
||||
interval?: string
|
||||
|
||||
// Maximum % of hosts in the load balancing pool for the upstream
|
||||
// service that can be ejected.
|
||||
maxEjectionPercent?: int
|
||||
|
||||
// Outlier detection will be enabled as long as the associated
|
||||
// load balancing pool has at least min_health_percent hosts in
|
||||
// healthy mode.
|
||||
minHealthPercent?: int
|
||||
|
||||
// Determines whether to distinguish local origin failures from
|
||||
// external errors.
|
||||
splitExternalLocalOriginErrors?: bool
|
||||
}
|
||||
|
||||
// Traffic policies specific to individual ports.
|
||||
portLevelSettings?: [...{
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings controlling the load balancer algorithms.
|
||||
loadBalancer?: ({} | {
|
||||
simple: _
|
||||
} | {
|
||||
consistentHash: _
|
||||
}) & {
|
||||
consistentHash?: ({} | {
|
||||
httpHeaderName: _
|
||||
} | {
|
||||
httpCookie: _
|
||||
} | {
|
||||
useSourceIp: _
|
||||
} | {
|
||||
httpQueryParameterName: _
|
||||
}) & ({} | {
|
||||
ringHash: _
|
||||
} | {
|
||||
maglev: _
|
||||
}) & {
|
||||
// Hash based on HTTP cookie.
|
||||
httpCookie?: {
|
||||
// Name of the cookie.
|
||||
name: string
|
||||
|
||||
// Path to set for the cookie.
|
||||
path?: string
|
||||
|
||||
// Lifetime of the cookie.
|
||||
ttl?: string
|
||||
}
|
||||
|
||||
// Hash based on a specific HTTP header.
|
||||
httpHeaderName?: string
|
||||
|
||||
// Hash based on a specific HTTP query parameter.
|
||||
httpQueryParameterName?: string
|
||||
maglev?: {
|
||||
// The table size for Maglev hashing.
|
||||
tableSize?: int
|
||||
}
|
||||
|
||||
// Deprecated.
|
||||
minimumRingSize?: int
|
||||
ringHash?: {
|
||||
// The minimum number of virtual nodes to use for the hash ring.
|
||||
minimumRingSize?: int
|
||||
}
|
||||
|
||||
// Hash based on the source IP address.
|
||||
useSourceIp?: bool
|
||||
}
|
||||
localityLbSetting?: {
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
distribute?: [...{
|
||||
// Originating locality, '/' separated, e.g.
|
||||
from?: string
|
||||
|
||||
// Map of upstream localities to traffic distribution weights.
|
||||
to?: {
|
||||
[string]: int
|
||||
}
|
||||
}]
|
||||
|
||||
// enable locality load balancing, this is DestinationRule-level
|
||||
// and will override mesh wide settings in entirety.
|
||||
enabled?: null | bool
|
||||
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
failover?: [...{
|
||||
// Originating region.
|
||||
from?: string
|
||||
|
||||
// Destination region the traffic will fail over to when endpoints
|
||||
// in the 'from' region becomes unhealthy.
|
||||
to?: string
|
||||
}]
|
||||
|
||||
// failoverPriority is an ordered list of labels used to sort
|
||||
// endpoints to do priority based load balancing.
|
||||
failoverPriority?: [...string]
|
||||
}
|
||||
simple?: "UNSPECIFIED" | "LEAST_CONN" | "RANDOM" | "PASSTHROUGH" | "ROUND_ROBIN" | "LEAST_REQUEST"
|
||||
|
||||
// Represents the warmup duration of Service.
|
||||
warmupDurationSecs?: string
|
||||
}
|
||||
outlierDetection?: {
|
||||
// Minimum ejection duration.
|
||||
baseEjectionTime?: string
|
||||
|
||||
// Number of 5xx errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutive5xxErrors?: null | int
|
||||
consecutiveErrors?: int
|
||||
|
||||
// Number of gateway errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutiveGatewayErrors?: null | int
|
||||
|
||||
// The number of consecutive locally originated failures before
|
||||
// ejection occurs.
|
||||
consecutiveLocalOriginFailures?: null | int
|
||||
|
||||
// Time interval between ejection sweep analysis.
|
||||
interval?: string
|
||||
|
||||
// Maximum % of hosts in the load balancing pool for the upstream
|
||||
// service that can be ejected.
|
||||
maxEjectionPercent?: int
|
||||
|
||||
// Outlier detection will be enabled as long as the associated
|
||||
// load balancing pool has at least min_health_percent hosts in
|
||||
// healthy mode.
|
||||
minHealthPercent?: int
|
||||
|
||||
// Determines whether to distinguish local origin failures from
|
||||
// external errors.
|
||||
splitExternalLocalOriginErrors?: bool
|
||||
}
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
tls?: {
|
||||
// OPTIONAL: The path to the file containing certificate authority
|
||||
// certificates to use in verifying a presented server
|
||||
// certificate.
|
||||
caCertificates?: string
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
clientCertificate?: string
|
||||
|
||||
// The name of the secret that holds the TLS certs for the client
|
||||
// including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// `insecureSkipVerify` specifies whether the proxy should skip
|
||||
// verifying the CA signature and SAN for the server certificate
|
||||
// corresponding to the host.
|
||||
insecureSkipVerify?: null | bool
|
||||
|
||||
// Indicates whether connections to this port should be secured
|
||||
// using TLS.
|
||||
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// SNI string to present to the server during TLS handshake.
|
||||
sni?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate.
|
||||
subjectAltNames?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
tls?: {
|
||||
// OPTIONAL: The path to the file containing certificate authority
|
||||
// certificates to use in verifying a presented server
|
||||
// certificate.
|
||||
caCertificates?: string
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
clientCertificate?: string
|
||||
|
||||
// The name of the secret that holds the TLS certs for the client
|
||||
// including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// `insecureSkipVerify` specifies whether the proxy should skip
|
||||
// verifying the CA signature and SAN for the server certificate
|
||||
// corresponding to the host.
|
||||
insecureSkipVerify?: null | bool
|
||||
|
||||
// Indicates whether connections to this port should be secured
|
||||
// using TLS.
|
||||
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// SNI string to present to the server during TLS handshake.
|
||||
sni?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate.
|
||||
subjectAltNames?: [...string]
|
||||
}
|
||||
|
||||
// Configuration of tunneling TCP over other transport or
|
||||
// application layers for the host configured in the
|
||||
// DestinationRule.
|
||||
tunnel?: {
|
||||
// Specifies which protocol to use for tunneling the downstream
|
||||
// connection.
|
||||
protocol?: string
|
||||
|
||||
// Specifies a host to which the downstream connection is
|
||||
// tunneled.
|
||||
targetHost: string
|
||||
|
||||
// Specifies a port to which the downstream connection is
|
||||
// tunneled.
|
||||
targetPort: int
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// Traffic policies to apply (load balancing policy, connection
|
||||
// pool sizes, outlier detection).
|
||||
trafficPolicy?: {
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings controlling the load balancer algorithms.
|
||||
loadBalancer?: ({} | {
|
||||
simple: _
|
||||
} | {
|
||||
consistentHash: _
|
||||
}) & {
|
||||
consistentHash?: ({} | {
|
||||
httpHeaderName: _
|
||||
} | {
|
||||
httpCookie: _
|
||||
} | {
|
||||
useSourceIp: _
|
||||
} | {
|
||||
httpQueryParameterName: _
|
||||
}) & ({} | {
|
||||
ringHash: _
|
||||
} | {
|
||||
maglev: _
|
||||
}) & {
|
||||
// Hash based on HTTP cookie.
|
||||
httpCookie?: {
|
||||
// Name of the cookie.
|
||||
name: string
|
||||
|
||||
// Path to set for the cookie.
|
||||
path?: string
|
||||
|
||||
// Lifetime of the cookie.
|
||||
ttl?: string
|
||||
}
|
||||
|
||||
// Hash based on a specific HTTP header.
|
||||
httpHeaderName?: string
|
||||
|
||||
// Hash based on a specific HTTP query parameter.
|
||||
httpQueryParameterName?: string
|
||||
maglev?: {
|
||||
// The table size for Maglev hashing.
|
||||
tableSize?: int
|
||||
}
|
||||
|
||||
// Deprecated.
|
||||
minimumRingSize?: int
|
||||
ringHash?: {
|
||||
// The minimum number of virtual nodes to use for the hash ring.
|
||||
minimumRingSize?: int
|
||||
}
|
||||
|
||||
// Hash based on the source IP address.
|
||||
useSourceIp?: bool
|
||||
}
|
||||
localityLbSetting?: {
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
distribute?: [...{
|
||||
// Originating locality, '/' separated, e.g.
|
||||
from?: string
|
||||
|
||||
// Map of upstream localities to traffic distribution weights.
|
||||
to?: {
|
||||
[string]: int
|
||||
}
|
||||
}]
|
||||
|
||||
// enable locality load balancing, this is DestinationRule-level
|
||||
// and will override mesh wide settings in entirety.
|
||||
enabled?: null | bool
|
||||
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
failover?: [...{
|
||||
// Originating region.
|
||||
from?: string
|
||||
|
||||
// Destination region the traffic will fail over to when endpoints
|
||||
// in the 'from' region becomes unhealthy.
|
||||
to?: string
|
||||
}]
|
||||
|
||||
// failoverPriority is an ordered list of labels used to sort
|
||||
// endpoints to do priority based load balancing.
|
||||
failoverPriority?: [...string]
|
||||
}
|
||||
simple?: "UNSPECIFIED" | "LEAST_CONN" | "RANDOM" | "PASSTHROUGH" | "ROUND_ROBIN" | "LEAST_REQUEST"
|
||||
|
||||
// Represents the warmup duration of Service.
|
||||
warmupDurationSecs?: string
|
||||
}
|
||||
outlierDetection?: {
|
||||
// Minimum ejection duration.
|
||||
baseEjectionTime?: string
|
||||
|
||||
// Number of 5xx errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutive5xxErrors?: null | int
|
||||
consecutiveErrors?: int
|
||||
|
||||
// Number of gateway errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutiveGatewayErrors?: null | int
|
||||
|
||||
// The number of consecutive locally originated failures before
|
||||
// ejection occurs.
|
||||
consecutiveLocalOriginFailures?: null | int
|
||||
|
||||
// Time interval between ejection sweep analysis.
|
||||
interval?: string
|
||||
|
||||
// Maximum % of hosts in the load balancing pool for the upstream
|
||||
// service that can be ejected.
|
||||
maxEjectionPercent?: int
|
||||
|
||||
// Outlier detection will be enabled as long as the associated
|
||||
// load balancing pool has at least min_health_percent hosts in
|
||||
// healthy mode.
|
||||
minHealthPercent?: int
|
||||
|
||||
// Determines whether to distinguish local origin failures from
|
||||
// external errors.
|
||||
splitExternalLocalOriginErrors?: bool
|
||||
}
|
||||
|
||||
// Traffic policies specific to individual ports.
|
||||
portLevelSettings?: [...{
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings controlling the load balancer algorithms.
|
||||
loadBalancer?: ({} | {
|
||||
simple: _
|
||||
} | {
|
||||
consistentHash: _
|
||||
}) & {
|
||||
consistentHash?: ({} | {
|
||||
httpHeaderName: _
|
||||
} | {
|
||||
httpCookie: _
|
||||
} | {
|
||||
useSourceIp: _
|
||||
} | {
|
||||
httpQueryParameterName: _
|
||||
}) & ({} | {
|
||||
ringHash: _
|
||||
} | {
|
||||
maglev: _
|
||||
}) & {
|
||||
// Hash based on HTTP cookie.
|
||||
httpCookie?: {
|
||||
// Name of the cookie.
|
||||
name: string
|
||||
|
||||
// Path to set for the cookie.
|
||||
path?: string
|
||||
|
||||
// Lifetime of the cookie.
|
||||
ttl?: string
|
||||
}
|
||||
|
||||
// Hash based on a specific HTTP header.
|
||||
httpHeaderName?: string
|
||||
|
||||
// Hash based on a specific HTTP query parameter.
|
||||
httpQueryParameterName?: string
|
||||
maglev?: {
|
||||
// The table size for Maglev hashing.
|
||||
tableSize?: int
|
||||
}
|
||||
|
||||
// Deprecated.
|
||||
minimumRingSize?: int
|
||||
ringHash?: {
|
||||
// The minimum number of virtual nodes to use for the hash ring.
|
||||
minimumRingSize?: int
|
||||
}
|
||||
|
||||
// Hash based on the source IP address.
|
||||
useSourceIp?: bool
|
||||
}
|
||||
localityLbSetting?: {
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
distribute?: [...{
|
||||
// Originating locality, '/' separated, e.g.
|
||||
from?: string
|
||||
|
||||
// Map of upstream localities to traffic distribution weights.
|
||||
to?: {
|
||||
[string]: int
|
||||
}
|
||||
}]
|
||||
|
||||
// enable locality load balancing, this is DestinationRule-level
|
||||
// and will override mesh wide settings in entirety.
|
||||
enabled?: null | bool
|
||||
|
||||
// Optional: only one of distribute, failover or failoverPriority
|
||||
// can be set.
|
||||
failover?: [...{
|
||||
// Originating region.
|
||||
from?: string
|
||||
|
||||
// Destination region the traffic will fail over to when endpoints
|
||||
// in the 'from' region becomes unhealthy.
|
||||
to?: string
|
||||
}]
|
||||
|
||||
// failoverPriority is an ordered list of labels used to sort
|
||||
// endpoints to do priority based load balancing.
|
||||
failoverPriority?: [...string]
|
||||
}
|
||||
simple?: "UNSPECIFIED" | "LEAST_CONN" | "RANDOM" | "PASSTHROUGH" | "ROUND_ROBIN" | "LEAST_REQUEST"
|
||||
|
||||
// Represents the warmup duration of Service.
|
||||
warmupDurationSecs?: string
|
||||
}
|
||||
outlierDetection?: {
|
||||
// Minimum ejection duration.
|
||||
baseEjectionTime?: string
|
||||
|
||||
// Number of 5xx errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutive5xxErrors?: null | int
|
||||
consecutiveErrors?: int
|
||||
|
||||
// Number of gateway errors before a host is ejected from the
|
||||
// connection pool.
|
||||
consecutiveGatewayErrors?: null | int
|
||||
|
||||
// The number of consecutive locally originated failures before
|
||||
// ejection occurs.
|
||||
consecutiveLocalOriginFailures?: null | int
|
||||
|
||||
// Time interval between ejection sweep analysis.
|
||||
interval?: string
|
||||
|
||||
// Maximum % of hosts in the load balancing pool for the upstream
|
||||
// service that can be ejected.
|
||||
maxEjectionPercent?: int
|
||||
|
||||
// Outlier detection will be enabled as long as the associated
|
||||
// load balancing pool has at least min_health_percent hosts in
|
||||
// healthy mode.
|
||||
minHealthPercent?: int
|
||||
|
||||
// Determines whether to distinguish local origin failures from
|
||||
// external errors.
|
||||
splitExternalLocalOriginErrors?: bool
|
||||
}
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
tls?: {
|
||||
// OPTIONAL: The path to the file containing certificate authority
|
||||
// certificates to use in verifying a presented server
|
||||
// certificate.
|
||||
caCertificates?: string
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
clientCertificate?: string
|
||||
|
||||
// The name of the secret that holds the TLS certs for the client
|
||||
// including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// `insecureSkipVerify` specifies whether the proxy should skip
|
||||
// verifying the CA signature and SAN for the server certificate
|
||||
// corresponding to the host.
|
||||
insecureSkipVerify?: null | bool
|
||||
|
||||
// Indicates whether connections to this port should be secured
|
||||
// using TLS.
|
||||
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// SNI string to present to the server during TLS handshake.
|
||||
sni?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate.
|
||||
subjectAltNames?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// TLS related settings for connections to the upstream service.
|
||||
tls?: {
|
||||
// OPTIONAL: The path to the file containing certificate authority
|
||||
// certificates to use in verifying a presented server
|
||||
// certificate.
|
||||
caCertificates?: string
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
clientCertificate?: string
|
||||
|
||||
// The name of the secret that holds the TLS certs for the client
|
||||
// including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// `insecureSkipVerify` specifies whether the proxy should skip
|
||||
// verifying the CA signature and SAN for the server certificate
|
||||
// corresponding to the host.
|
||||
insecureSkipVerify?: null | bool
|
||||
|
||||
// Indicates whether connections to this port should be secured
|
||||
// using TLS.
|
||||
mode?: "DISABLE" | "SIMPLE" | "MUTUAL" | "ISTIO_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// SNI string to present to the server during TLS handshake.
|
||||
sni?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate.
|
||||
subjectAltNames?: [...string]
|
||||
}
|
||||
|
||||
// Configuration of tunneling TCP over other transport or
|
||||
// application layers for the host configured in the
|
||||
// DestinationRule.
|
||||
tunnel?: {
|
||||
// Specifies which protocol to use for tunneling the downstream
|
||||
// connection.
|
||||
protocol?: string
|
||||
|
||||
// Specifies a host to which the downstream connection is
|
||||
// tunneled.
|
||||
targetHost: string
|
||||
|
||||
// Specifies a port to which the downstream connection is
|
||||
// tunneled.
|
||||
targetPort: int
|
||||
}
|
||||
}
|
||||
workloadSelector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which a policy should be applied.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import "strings"
|
||||
|
||||
#EnvoyFilter: {
|
||||
// Customizing Envoy configuration generated by Istio. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/networking/envoy-filter.html
|
||||
spec!: #EnvoyFilterSpec
|
||||
apiVersion: "networking.istio.io/v1alpha3"
|
||||
kind: "EnvoyFilter"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Customizing Envoy configuration generated by Istio. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/networking/envoy-filter.html
|
||||
#EnvoyFilterSpec: {
|
||||
// One or more patches with match conditions.
|
||||
configPatches?: [...{
|
||||
// Specifies where in the Envoy configuration, the patch should be
|
||||
// applied.
|
||||
applyTo?: "INVALID" | "LISTENER" | "FILTER_CHAIN" | "NETWORK_FILTER" | "HTTP_FILTER" | "ROUTE_CONFIGURATION" | "VIRTUAL_HOST" | "HTTP_ROUTE" | "CLUSTER" | "EXTENSION_CONFIG" | "BOOTSTRAP" | "LISTENER_FILTER"
|
||||
|
||||
// Match on listener/route configuration/cluster.
|
||||
match?: ({} | {
|
||||
listener: _
|
||||
} | {
|
||||
routeConfiguration: _
|
||||
} | {
|
||||
cluster: _
|
||||
}) & {
|
||||
// Match on envoy cluster attributes.
|
||||
cluster?: {
|
||||
// The exact name of the cluster to match.
|
||||
name?: string
|
||||
|
||||
// The service port for which this cluster was generated.
|
||||
portNumber?: int
|
||||
|
||||
// The fully qualified service name for this cluster.
|
||||
service?: string
|
||||
|
||||
// The subset associated with the service.
|
||||
subset?: string
|
||||
}
|
||||
|
||||
// The specific config generation context to match on.
|
||||
context?: "ANY" | "SIDECAR_INBOUND" | "SIDECAR_OUTBOUND" | "GATEWAY"
|
||||
|
||||
// Match on envoy listener attributes.
|
||||
listener?: {
|
||||
// Match a specific filter chain in a listener.
|
||||
filterChain?: {
|
||||
// Applies only to sidecars.
|
||||
applicationProtocols?: string
|
||||
|
||||
// The destination_port value used by a filter chain's match
|
||||
// condition.
|
||||
destinationPort?: int
|
||||
|
||||
// The name of a specific filter to apply the patch to.
|
||||
filter?: {
|
||||
// The filter name to match on.
|
||||
name?: string
|
||||
subFilter?: {
|
||||
// The filter name to match on.
|
||||
name?: string
|
||||
}
|
||||
}
|
||||
|
||||
// The name assigned to the filter chain.
|
||||
name?: string
|
||||
|
||||
// The SNI value used by a filter chain's match condition.
|
||||
sni?: string
|
||||
|
||||
// Applies only to `SIDECAR_INBOUND` context.
|
||||
transportProtocol?: string
|
||||
}
|
||||
|
||||
// Match a specific listener filter.
|
||||
listenerFilter?: string
|
||||
|
||||
// Match a specific listener by its name.
|
||||
name?: string
|
||||
portName?: string
|
||||
|
||||
// The service port/gateway port to which traffic is being
|
||||
// sent/received.
|
||||
portNumber?: int
|
||||
}
|
||||
|
||||
// Match on properties associated with a proxy.
|
||||
proxy?: {
|
||||
// Match on the node metadata supplied by a proxy when connecting
|
||||
// to Istio Pilot.
|
||||
metadata?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// A regular expression in golang regex format (RE2) that can be
|
||||
// used to select proxies using a specific version of istio
|
||||
// proxy.
|
||||
proxyVersion?: string
|
||||
}
|
||||
|
||||
// Match on envoy HTTP route configuration attributes.
|
||||
routeConfiguration?: {
|
||||
// The Istio gateway config's namespace/name for which this route
|
||||
// configuration was generated.
|
||||
gateway?: string
|
||||
|
||||
// Route configuration name to match on.
|
||||
name?: string
|
||||
|
||||
// Applicable only for GATEWAY context.
|
||||
portName?: string
|
||||
|
||||
// The service port number or gateway server port number for which
|
||||
// this route configuration was generated.
|
||||
portNumber?: int
|
||||
|
||||
// Match a specific virtual host in a route configuration and
|
||||
// apply the patch to the virtual host.
|
||||
vhost?: {
|
||||
// The VirtualHosts objects generated by Istio are named as
|
||||
// host:port, where the host typically corresponds to the
|
||||
// VirtualService's host field or the hostname of a service in
|
||||
// the registry.
|
||||
name?: string
|
||||
|
||||
// Match a specific route within the virtual host.
|
||||
route?: {
|
||||
// Match a route with specific action type.
|
||||
action?: "ANY" | "ROUTE" | "REDIRECT" | "DIRECT_RESPONSE"
|
||||
|
||||
// The Route objects generated by default are named as default.
|
||||
name?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The patch to apply along with the operation.
|
||||
patch?: {
|
||||
// Determines the filter insertion order.
|
||||
filterClass?: "UNSPECIFIED" | "AUTHN" | "AUTHZ" | "STATS"
|
||||
|
||||
// Determines how the patch should be applied.
|
||||
operation?: "INVALID" | "MERGE" | "ADD" | "REMOVE" | "INSERT_BEFORE" | "INSERT_AFTER" | "INSERT_FIRST" | "REPLACE"
|
||||
|
||||
// The JSON config of the object being patched.
|
||||
value?: {}
|
||||
}
|
||||
}]
|
||||
|
||||
// Priority defines the order in which patch sets are applied
|
||||
// within a context.
|
||||
priority?: int
|
||||
workloadSelector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which the configuration should be applied.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import "strings"
|
||||
|
||||
#Gateway: {
|
||||
// Configuration affecting edge load balancer. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/networking/gateway.html
|
||||
spec!: #GatewaySpec
|
||||
apiVersion: "networking.istio.io/v1alpha3"
|
||||
kind: "Gateway"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting edge load balancer. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/networking/gateway.html
|
||||
#GatewaySpec: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which this gateway configuration should be applied.
|
||||
selector?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// A list of server specifications.
|
||||
servers?: [...{
|
||||
// The ip or the Unix domain socket to which the listener should
|
||||
// be bound to.
|
||||
bind?: string
|
||||
defaultEndpoint?: string
|
||||
|
||||
// One or more hosts exposed by this gateway.
|
||||
hosts: [...string]
|
||||
|
||||
// An optional name of the server, when set must be unique across
|
||||
// all servers.
|
||||
name?: string
|
||||
|
||||
// The Port on which the proxy should listen for incoming
|
||||
// connections.
|
||||
port: {
|
||||
// Label assigned to the port.
|
||||
name: string
|
||||
|
||||
// A valid non-negative integer port number.
|
||||
number: int
|
||||
|
||||
// The protocol exposed on the port.
|
||||
protocol: string
|
||||
targetPort?: int
|
||||
}
|
||||
|
||||
// Set of TLS related options that govern the server's behavior.
|
||||
tls?: {
|
||||
// REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`.
|
||||
caCertificates?: string
|
||||
|
||||
// Optional: If specified, only support the specified cipher list.
|
||||
cipherSuites?: [...string]
|
||||
|
||||
// For gateways running on Kubernetes, the name of the secret that
|
||||
// holds the TLS certs including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// If set to true, the load balancer will send a 301 redirect for
|
||||
// all http connections, asking the clients to use HTTPS.
|
||||
httpsRedirect?: bool
|
||||
|
||||
// Optional: Maximum TLS protocol version.
|
||||
maxProtocolVersion?: "TLS_AUTO" | "TLSV1_0" | "TLSV1_1" | "TLSV1_2" | "TLSV1_3"
|
||||
|
||||
// Optional: Minimum TLS protocol version.
|
||||
minProtocolVersion?: "TLS_AUTO" | "TLSV1_0" | "TLSV1_1" | "TLSV1_2" | "TLSV1_3"
|
||||
|
||||
// Optional: Indicates whether connections to this port should be
|
||||
// secured using TLS.
|
||||
mode?: "PASSTHROUGH" | "SIMPLE" | "MUTUAL" | "AUTO_PASSTHROUGH" | "ISTIO_MUTUAL" | "OPTIONAL_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
|
||||
serverCertificate?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate presented by the client.
|
||||
subjectAltNames?: [...string]
|
||||
|
||||
// An optional list of hex-encoded SHA-256 hashes of the
|
||||
// authorized client certificates.
|
||||
verifyCertificateHash?: [...string]
|
||||
|
||||
// An optional list of base64-encoded SHA-256 hashes of the SPKIs
|
||||
// of authorized client certificates.
|
||||
verifyCertificateSpki?: [...string]
|
||||
}
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#Gateway: {
|
||||
// Configuration affecting edge load balancer. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/networking/gateway.html
|
||||
spec!: #GatewaySpec
|
||||
apiVersion: "networking.istio.io/v1beta1"
|
||||
kind: "Gateway"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting edge load balancer. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/networking/gateway.html
|
||||
#GatewaySpec: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which this gateway configuration should be applied.
|
||||
selector?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// A list of server specifications.
|
||||
servers?: [...{
|
||||
// The ip or the Unix domain socket to which the listener should
|
||||
// be bound to.
|
||||
bind?: string
|
||||
defaultEndpoint?: string
|
||||
|
||||
// One or more hosts exposed by this gateway.
|
||||
hosts: [...string]
|
||||
|
||||
// An optional name of the server, when set must be unique across
|
||||
// all servers.
|
||||
name?: string
|
||||
|
||||
// The Port on which the proxy should listen for incoming
|
||||
// connections.
|
||||
port: {
|
||||
// Label assigned to the port.
|
||||
name: string
|
||||
|
||||
// A valid non-negative integer port number.
|
||||
number: int
|
||||
|
||||
// The protocol exposed on the port.
|
||||
protocol: string
|
||||
targetPort?: int
|
||||
}
|
||||
|
||||
// Set of TLS related options that govern the server's behavior.
|
||||
tls?: {
|
||||
// REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`.
|
||||
caCertificates?: string
|
||||
|
||||
// Optional: If specified, only support the specified cipher list.
|
||||
cipherSuites?: [...string]
|
||||
|
||||
// For gateways running on Kubernetes, the name of the secret that
|
||||
// holds the TLS certs including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// If set to true, the load balancer will send a 301 redirect for
|
||||
// all http connections, asking the clients to use HTTPS.
|
||||
httpsRedirect?: bool
|
||||
|
||||
// Optional: Maximum TLS protocol version.
|
||||
maxProtocolVersion?: "TLS_AUTO" | "TLSV1_0" | "TLSV1_1" | "TLSV1_2" | "TLSV1_3"
|
||||
|
||||
// Optional: Minimum TLS protocol version.
|
||||
minProtocolVersion?: "TLS_AUTO" | "TLSV1_0" | "TLSV1_1" | "TLSV1_2" | "TLSV1_3"
|
||||
|
||||
// Optional: Indicates whether connections to this port should be
|
||||
// secured using TLS.
|
||||
mode?: "PASSTHROUGH" | "SIMPLE" | "MUTUAL" | "AUTO_PASSTHROUGH" | "ISTIO_MUTUAL" | "OPTIONAL_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
|
||||
serverCertificate?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate presented by the client.
|
||||
subjectAltNames?: [...string]
|
||||
|
||||
// An optional list of hex-encoded SHA-256 hashes of the
|
||||
// authorized client certificates.
|
||||
verifyCertificateHash?: [...string]
|
||||
|
||||
// An optional list of base64-encoded SHA-256 hashes of the SPKIs
|
||||
// of authorized client certificates.
|
||||
verifyCertificateSpki?: [...string]
|
||||
}
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#ProxyConfig: {
|
||||
// Provides configuration for individual workloads. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/networking/proxy-config.html
|
||||
spec!: #ProxyConfigSpec
|
||||
apiVersion: "networking.istio.io/v1beta1"
|
||||
kind: "ProxyConfig"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Provides configuration for individual workloads. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/networking/proxy-config.html
|
||||
#ProxyConfigSpec: {
|
||||
// The number of worker threads to run.
|
||||
concurrency?: null | int
|
||||
|
||||
// Additional environment variables for the proxy.
|
||||
environmentVariables?: {
|
||||
[string]: string
|
||||
}
|
||||
image?: {
|
||||
// The image type of the image.
|
||||
imageType?: string
|
||||
}
|
||||
selector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which a policy should be applied.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import "strings"
|
||||
|
||||
#ServiceEntry: {
|
||||
// Configuration affecting service registry. See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/service-entry.html
|
||||
spec!: #ServiceEntrySpec
|
||||
apiVersion: "networking.istio.io/v1alpha3"
|
||||
kind: "ServiceEntry"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting service registry. See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/service-entry.html
|
||||
#ServiceEntrySpec: {
|
||||
// The virtual IP addresses associated with the service.
|
||||
addresses?: [...string]
|
||||
|
||||
// One or more endpoints associated with the service.
|
||||
endpoints?: [...{
|
||||
// Address associated with the network endpoint without the port.
|
||||
address?: string
|
||||
|
||||
// One or more labels associated with the endpoint.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// The locality associated with the endpoint.
|
||||
locality?: string
|
||||
|
||||
// Network enables Istio to group endpoints resident in the same
|
||||
// L3 domain/network.
|
||||
network?: string
|
||||
|
||||
// Set of ports associated with the endpoint.
|
||||
ports?: {
|
||||
[string]: int
|
||||
}
|
||||
|
||||
// The service account associated with the workload if a sidecar
|
||||
// is present in the workload.
|
||||
serviceAccount?: string
|
||||
|
||||
// The load balancing weight associated with the endpoint.
|
||||
weight?: int
|
||||
}]
|
||||
|
||||
// A list of namespaces to which this service is exported.
|
||||
exportTo?: [...string]
|
||||
|
||||
// The hosts associated with the ServiceEntry.
|
||||
hosts: [...string]
|
||||
|
||||
// Specify whether the service should be considered external to
|
||||
// the mesh or part of the mesh.
|
||||
location?: "MESH_EXTERNAL" | "MESH_INTERNAL"
|
||||
|
||||
// The ports associated with the external service.
|
||||
ports?: [...{
|
||||
// Label assigned to the port.
|
||||
name: string
|
||||
|
||||
// A valid non-negative integer port number.
|
||||
number: int
|
||||
|
||||
// The protocol exposed on the port.
|
||||
protocol?: string
|
||||
|
||||
// The port number on the endpoint where the traffic will be
|
||||
// received.
|
||||
targetPort?: int
|
||||
}]
|
||||
|
||||
// Service resolution mode for the hosts.
|
||||
resolution?: "NONE" | "STATIC" | "DNS" | "DNS_ROUND_ROBIN"
|
||||
|
||||
// If specified, the proxy will verify that the server
|
||||
// certificate's subject alternate name matches one of the
|
||||
// specified values.
|
||||
subjectAltNames?: [...string]
|
||||
workloadSelector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which the configuration should be applied.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#ServiceEntry: {
|
||||
// Configuration affecting service registry. See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/service-entry.html
|
||||
spec!: #ServiceEntrySpec
|
||||
apiVersion: "networking.istio.io/v1beta1"
|
||||
kind: "ServiceEntry"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting service registry. See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/service-entry.html
|
||||
#ServiceEntrySpec: {
|
||||
// The virtual IP addresses associated with the service.
|
||||
addresses?: [...string]
|
||||
|
||||
// One or more endpoints associated with the service.
|
||||
endpoints?: [...{
|
||||
// Address associated with the network endpoint without the port.
|
||||
address?: string
|
||||
|
||||
// One or more labels associated with the endpoint.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// The locality associated with the endpoint.
|
||||
locality?: string
|
||||
|
||||
// Network enables Istio to group endpoints resident in the same
|
||||
// L3 domain/network.
|
||||
network?: string
|
||||
|
||||
// Set of ports associated with the endpoint.
|
||||
ports?: {
|
||||
[string]: int
|
||||
}
|
||||
|
||||
// The service account associated with the workload if a sidecar
|
||||
// is present in the workload.
|
||||
serviceAccount?: string
|
||||
|
||||
// The load balancing weight associated with the endpoint.
|
||||
weight?: int
|
||||
}]
|
||||
|
||||
// A list of namespaces to which this service is exported.
|
||||
exportTo?: [...string]
|
||||
|
||||
// The hosts associated with the ServiceEntry.
|
||||
hosts: [...string]
|
||||
|
||||
// Specify whether the service should be considered external to
|
||||
// the mesh or part of the mesh.
|
||||
location?: "MESH_EXTERNAL" | "MESH_INTERNAL"
|
||||
|
||||
// The ports associated with the external service.
|
||||
ports?: [...{
|
||||
// Label assigned to the port.
|
||||
name: string
|
||||
|
||||
// A valid non-negative integer port number.
|
||||
number: int
|
||||
|
||||
// The protocol exposed on the port.
|
||||
protocol?: string
|
||||
|
||||
// The port number on the endpoint where the traffic will be
|
||||
// received.
|
||||
targetPort?: int
|
||||
}]
|
||||
|
||||
// Service resolution mode for the hosts.
|
||||
resolution?: "NONE" | "STATIC" | "DNS" | "DNS_ROUND_ROBIN"
|
||||
|
||||
// If specified, the proxy will verify that the server
|
||||
// certificate's subject alternate name matches one of the
|
||||
// specified values.
|
||||
subjectAltNames?: [...string]
|
||||
workloadSelector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which the configuration should be applied.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import "strings"
|
||||
|
||||
#Sidecar: {
|
||||
// Configuration affecting network reachability of a sidecar. See
|
||||
// more details at:
|
||||
// https://istio.io/docs/reference/config/networking/sidecar.html
|
||||
spec!: #SidecarSpec
|
||||
apiVersion: "networking.istio.io/v1alpha3"
|
||||
kind: "Sidecar"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting network reachability of a sidecar. See
|
||||
// more details at:
|
||||
// https://istio.io/docs/reference/config/networking/sidecar.html
|
||||
#SidecarSpec: {
|
||||
// Egress specifies the configuration of the sidecar for
|
||||
// processing outbound traffic from the attached workload
|
||||
// instance to other services in the mesh.
|
||||
egress?: [...{
|
||||
// The IP(IPv4 or IPv6) or the Unix domain socket to which the
|
||||
// listener should be bound to.
|
||||
bind?: string
|
||||
|
||||
// When the bind address is an IP, the captureMode option dictates
|
||||
// how traffic to the listener is expected to be captured (or
|
||||
// not).
|
||||
captureMode?: "DEFAULT" | "IPTABLES" | "NONE"
|
||||
|
||||
// One or more service hosts exposed by the listener in
|
||||
// `namespace/dnsName` format.
|
||||
hosts: [...string]
|
||||
|
||||
// The port associated with the listener.
|
||||
port?: {
|
||||
// Label assigned to the port.
|
||||
name?: string
|
||||
|
||||
// A valid non-negative integer port number.
|
||||
number?: int
|
||||
|
||||
// The protocol exposed on the port.
|
||||
protocol?: string
|
||||
targetPort?: int
|
||||
}
|
||||
}]
|
||||
|
||||
// Settings controlling the volume of connections Envoy will
|
||||
// accept from the network.
|
||||
inboundConnectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ingress specifies the configuration of the sidecar for
|
||||
// processing inbound traffic to the attached workload instance.
|
||||
ingress?: [...{
|
||||
// The IP(IPv4 or IPv6) to which the listener should be bound.
|
||||
bind?: string
|
||||
|
||||
// The captureMode option dictates how traffic to the listener is
|
||||
// expected to be captured (or not).
|
||||
captureMode?: "DEFAULT" | "IPTABLES" | "NONE"
|
||||
|
||||
// Settings controlling the volume of connections Envoy will
|
||||
// accept from the network.
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The IP endpoint or Unix domain socket to which traffic should
|
||||
// be forwarded to.
|
||||
defaultEndpoint?: string
|
||||
|
||||
// The port associated with the listener.
|
||||
port: {
|
||||
// Label assigned to the port.
|
||||
name?: string
|
||||
|
||||
// A valid non-negative integer port number.
|
||||
number?: int
|
||||
|
||||
// The protocol exposed on the port.
|
||||
protocol?: string
|
||||
targetPort?: int
|
||||
}
|
||||
|
||||
// Set of TLS related options that will enable TLS termination on
|
||||
// the sidecar for requests originating from outside the mesh.
|
||||
tls?: {
|
||||
// REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`.
|
||||
caCertificates?: string
|
||||
|
||||
// Optional: If specified, only support the specified cipher list.
|
||||
cipherSuites?: [...string]
|
||||
|
||||
// For gateways running on Kubernetes, the name of the secret that
|
||||
// holds the TLS certs including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// If set to true, the load balancer will send a 301 redirect for
|
||||
// all http connections, asking the clients to use HTTPS.
|
||||
httpsRedirect?: bool
|
||||
|
||||
// Optional: Maximum TLS protocol version.
|
||||
maxProtocolVersion?: "TLS_AUTO" | "TLSV1_0" | "TLSV1_1" | "TLSV1_2" | "TLSV1_3"
|
||||
|
||||
// Optional: Minimum TLS protocol version.
|
||||
minProtocolVersion?: "TLS_AUTO" | "TLSV1_0" | "TLSV1_1" | "TLSV1_2" | "TLSV1_3"
|
||||
|
||||
// Optional: Indicates whether connections to this port should be
|
||||
// secured using TLS.
|
||||
mode?: "PASSTHROUGH" | "SIMPLE" | "MUTUAL" | "AUTO_PASSTHROUGH" | "ISTIO_MUTUAL" | "OPTIONAL_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
|
||||
serverCertificate?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate presented by the client.
|
||||
subjectAltNames?: [...string]
|
||||
|
||||
// An optional list of hex-encoded SHA-256 hashes of the
|
||||
// authorized client certificates.
|
||||
verifyCertificateHash?: [...string]
|
||||
|
||||
// An optional list of base64-encoded SHA-256 hashes of the SPKIs
|
||||
// of authorized client certificates.
|
||||
verifyCertificateSpki?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// Configuration for the outbound traffic policy.
|
||||
outboundTrafficPolicy?: {
|
||||
egressProxy?: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
mode?: "REGISTRY_ONLY" | "ALLOW_ANY"
|
||||
}
|
||||
workloadSelector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which the configuration should be applied.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#Sidecar: {
|
||||
// Configuration affecting network reachability of a sidecar. See
|
||||
// more details at:
|
||||
// https://istio.io/docs/reference/config/networking/sidecar.html
|
||||
spec!: #SidecarSpec
|
||||
apiVersion: "networking.istio.io/v1beta1"
|
||||
kind: "Sidecar"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting network reachability of a sidecar. See
|
||||
// more details at:
|
||||
// https://istio.io/docs/reference/config/networking/sidecar.html
|
||||
#SidecarSpec: {
|
||||
// Egress specifies the configuration of the sidecar for
|
||||
// processing outbound traffic from the attached workload
|
||||
// instance to other services in the mesh.
|
||||
egress?: [...{
|
||||
// The IP(IPv4 or IPv6) or the Unix domain socket to which the
|
||||
// listener should be bound to.
|
||||
bind?: string
|
||||
|
||||
// When the bind address is an IP, the captureMode option dictates
|
||||
// how traffic to the listener is expected to be captured (or
|
||||
// not).
|
||||
captureMode?: "DEFAULT" | "IPTABLES" | "NONE"
|
||||
|
||||
// One or more service hosts exposed by the listener in
|
||||
// `namespace/dnsName` format.
|
||||
hosts: [...string]
|
||||
|
||||
// The port associated with the listener.
|
||||
port?: {
|
||||
// Label assigned to the port.
|
||||
name?: string
|
||||
|
||||
// A valid non-negative integer port number.
|
||||
number?: int
|
||||
|
||||
// The protocol exposed on the port.
|
||||
protocol?: string
|
||||
targetPort?: int
|
||||
}
|
||||
}]
|
||||
|
||||
// Settings controlling the volume of connections Envoy will
|
||||
// accept from the network.
|
||||
inboundConnectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ingress specifies the configuration of the sidecar for
|
||||
// processing inbound traffic to the attached workload instance.
|
||||
ingress?: [...{
|
||||
// The IP(IPv4 or IPv6) to which the listener should be bound.
|
||||
bind?: string
|
||||
|
||||
// The captureMode option dictates how traffic to the listener is
|
||||
// expected to be captured (or not).
|
||||
captureMode?: "DEFAULT" | "IPTABLES" | "NONE"
|
||||
|
||||
// Settings controlling the volume of connections Envoy will
|
||||
// accept from the network.
|
||||
connectionPool?: {
|
||||
// HTTP connection pool settings.
|
||||
http?: {
|
||||
// Specify if http1.1 connection should be upgraded to http2 for
|
||||
// the associated destination.
|
||||
h2UpgradePolicy?: "DEFAULT" | "DO_NOT_UPGRADE" | "UPGRADE"
|
||||
|
||||
// Maximum number of requests that will be queued while waiting
|
||||
// for a ready connection pool connection.
|
||||
http1MaxPendingRequests?: int
|
||||
|
||||
// Maximum number of active requests to a destination.
|
||||
http2MaxRequests?: int
|
||||
|
||||
// The idle timeout for upstream connection pool connections.
|
||||
idleTimeout?: string
|
||||
|
||||
// Maximum number of requests per connection to a backend.
|
||||
maxRequestsPerConnection?: int
|
||||
|
||||
// Maximum number of retries that can be outstanding to all hosts
|
||||
// in a cluster at a given time.
|
||||
maxRetries?: int
|
||||
|
||||
// If set to true, client protocol will be preserved while
|
||||
// initiating connection to backend.
|
||||
useClientProtocol?: bool
|
||||
}
|
||||
|
||||
// Settings common to both HTTP and TCP upstream connections.
|
||||
tcp?: {
|
||||
// TCP connection timeout.
|
||||
connectTimeout?: string
|
||||
|
||||
// The maximum duration of a connection.
|
||||
maxConnectionDuration?: string
|
||||
|
||||
// Maximum number of HTTP1 /TCP connections to a destination host.
|
||||
maxConnections?: int
|
||||
|
||||
// If set then set SO_KEEPALIVE on the socket to enable TCP
|
||||
// Keepalives.
|
||||
tcpKeepalive?: {
|
||||
// The time duration between keep-alive probes.
|
||||
interval?: string
|
||||
|
||||
// Maximum number of keepalive probes to send without response
|
||||
// before deciding the connection is dead.
|
||||
probes?: int
|
||||
|
||||
// The time duration a connection needs to be idle before
|
||||
// keep-alive probes start being sent.
|
||||
time?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The IP endpoint or Unix domain socket to which traffic should
|
||||
// be forwarded to.
|
||||
defaultEndpoint?: string
|
||||
|
||||
// The port associated with the listener.
|
||||
port: {
|
||||
// Label assigned to the port.
|
||||
name?: string
|
||||
|
||||
// A valid non-negative integer port number.
|
||||
number?: int
|
||||
|
||||
// The protocol exposed on the port.
|
||||
protocol?: string
|
||||
targetPort?: int
|
||||
}
|
||||
|
||||
// Set of TLS related options that will enable TLS termination on
|
||||
// the sidecar for requests originating from outside the mesh.
|
||||
tls?: {
|
||||
// REQUIRED if mode is `MUTUAL` or `OPTIONAL_MUTUAL`.
|
||||
caCertificates?: string
|
||||
|
||||
// Optional: If specified, only support the specified cipher list.
|
||||
cipherSuites?: [...string]
|
||||
|
||||
// For gateways running on Kubernetes, the name of the secret that
|
||||
// holds the TLS certs including the CA certificates.
|
||||
credentialName?: string
|
||||
|
||||
// If set to true, the load balancer will send a 301 redirect for
|
||||
// all http connections, asking the clients to use HTTPS.
|
||||
httpsRedirect?: bool
|
||||
|
||||
// Optional: Maximum TLS protocol version.
|
||||
maxProtocolVersion?: "TLS_AUTO" | "TLSV1_0" | "TLSV1_1" | "TLSV1_2" | "TLSV1_3"
|
||||
|
||||
// Optional: Minimum TLS protocol version.
|
||||
minProtocolVersion?: "TLS_AUTO" | "TLSV1_0" | "TLSV1_1" | "TLSV1_2" | "TLSV1_3"
|
||||
|
||||
// Optional: Indicates whether connections to this port should be
|
||||
// secured using TLS.
|
||||
mode?: "PASSTHROUGH" | "SIMPLE" | "MUTUAL" | "AUTO_PASSTHROUGH" | "ISTIO_MUTUAL" | "OPTIONAL_MUTUAL"
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
|
||||
privateKey?: string
|
||||
|
||||
// REQUIRED if mode is `SIMPLE` or `MUTUAL`.
|
||||
serverCertificate?: string
|
||||
|
||||
// A list of alternate names to verify the subject identity in the
|
||||
// certificate presented by the client.
|
||||
subjectAltNames?: [...string]
|
||||
|
||||
// An optional list of hex-encoded SHA-256 hashes of the
|
||||
// authorized client certificates.
|
||||
verifyCertificateHash?: [...string]
|
||||
|
||||
// An optional list of base64-encoded SHA-256 hashes of the SPKIs
|
||||
// of authorized client certificates.
|
||||
verifyCertificateSpki?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// Configuration for the outbound traffic policy.
|
||||
outboundTrafficPolicy?: {
|
||||
egressProxy?: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
mode?: "REGISTRY_ONLY" | "ALLOW_ANY"
|
||||
}
|
||||
workloadSelector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which the configuration should be applied.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,594 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import "strings"
|
||||
|
||||
#VirtualService: {
|
||||
// Configuration affecting label/content routing, sni routing,
|
||||
// etc. See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/virtual-service.html
|
||||
spec!: #VirtualServiceSpec
|
||||
apiVersion: "networking.istio.io/v1alpha3"
|
||||
kind: "VirtualService"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting label/content routing, sni routing,
|
||||
// etc. See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/virtual-service.html
|
||||
#VirtualServiceSpec: {
|
||||
// A list of namespaces to which this virtual service is exported.
|
||||
exportTo?: [...string]
|
||||
|
||||
// The names of gateways and sidecars that should apply these
|
||||
// routes.
|
||||
gateways?: [...string]
|
||||
|
||||
// The destination hosts to which traffic is being sent.
|
||||
hosts?: [...string]
|
||||
|
||||
// An ordered list of route rules for HTTP traffic.
|
||||
http?: [...{
|
||||
// Cross-Origin Resource Sharing policy (CORS).
|
||||
corsPolicy?: {
|
||||
// Indicates whether the caller is allowed to send the actual
|
||||
// request (not the preflight) using credentials.
|
||||
allowCredentials?: null | bool
|
||||
|
||||
// List of HTTP headers that can be used when requesting the
|
||||
// resource.
|
||||
allowHeaders?: [...string]
|
||||
|
||||
// List of HTTP methods allowed to access the resource.
|
||||
allowMethods?: [...string]
|
||||
allowOrigin?: [...string]
|
||||
|
||||
// String patterns that match allowed origins.
|
||||
allowOrigins?: [...({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}]
|
||||
|
||||
// A list of HTTP headers that the browsers are allowed to access.
|
||||
exposeHeaders?: [...string]
|
||||
|
||||
// Specifies how long the results of a preflight request can be
|
||||
// cached.
|
||||
maxAge?: string
|
||||
}
|
||||
|
||||
// Delegate is used to specify the particular VirtualService which
|
||||
// can be used to define delegate HTTPRoute.
|
||||
delegate?: {
|
||||
// Name specifies the name of the delegate VirtualService.
|
||||
name?: string
|
||||
|
||||
// Namespace specifies the namespace where the delegate
|
||||
// VirtualService resides.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// A HTTP rule can either return a direct_response, redirect or
|
||||
// forward (default) traffic.
|
||||
directResponse?: {
|
||||
// Specifies the content of the response body.
|
||||
body?: ({} | {
|
||||
string: _
|
||||
} | {
|
||||
bytes: _
|
||||
}) & {
|
||||
// response body as base64 encoded bytes.
|
||||
bytes?: string
|
||||
string?: string
|
||||
}
|
||||
|
||||
// Specifies the HTTP response status to be returned.
|
||||
status: int
|
||||
}
|
||||
|
||||
// Fault injection policy to apply on HTTP traffic at the client
|
||||
// side.
|
||||
fault?: {
|
||||
// Abort Http request attempts and return error codes back to
|
||||
// downstream service, giving the impression that the upstream
|
||||
// service is faulty.
|
||||
abort?: ({} | {
|
||||
httpStatus: _
|
||||
} | {
|
||||
grpcStatus: _
|
||||
} | {
|
||||
http2Error: _
|
||||
}) & {
|
||||
// GRPC status code to use to abort the request.
|
||||
grpcStatus?: string
|
||||
http2Error?: string
|
||||
|
||||
// HTTP status code to use to abort the Http request.
|
||||
httpStatus?: int
|
||||
percentage?: {
|
||||
value?: number
|
||||
}
|
||||
}
|
||||
|
||||
// Delay requests before forwarding, emulating various failures
|
||||
// such as network issues, overloaded upstream service, etc.
|
||||
delay?: ({} | {
|
||||
fixedDelay: _
|
||||
} | {
|
||||
exponentialDelay: _
|
||||
}) & {
|
||||
exponentialDelay?: string
|
||||
|
||||
// Add a fixed delay before forwarding the request.
|
||||
fixedDelay?: string
|
||||
|
||||
// Percentage of requests on which the delay will be injected
|
||||
// (0-100).
|
||||
percent?: int
|
||||
percentage?: {
|
||||
value?: number
|
||||
}
|
||||
}
|
||||
}
|
||||
headers?: {
|
||||
request?: {
|
||||
add?: {
|
||||
[string]: string
|
||||
}
|
||||
remove?: [...string]
|
||||
set?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
response?: {
|
||||
add?: {
|
||||
[string]: string
|
||||
}
|
||||
remove?: [...string]
|
||||
set?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Match conditions to be satisfied for the rule to be activated.
|
||||
match?: [...{
|
||||
// HTTP Authority values are case-sensitive and formatted as
|
||||
// follows: - `exact: "value"` for exact string match - `prefix:
|
||||
// "value"` for prefix-based match - `regex: "value"` for RE2
|
||||
// style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
authority?: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
|
||||
// Names of gateways where the rule should be applied.
|
||||
gateways?: [...string]
|
||||
|
||||
// The header keys must be lowercase and use hyphen as the
|
||||
// separator, e.g.
|
||||
headers?: {
|
||||
[string]: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Flag to specify whether the URI matching should be
|
||||
// case-insensitive.
|
||||
ignoreUriCase?: bool
|
||||
|
||||
// HTTP Method values are case-sensitive and formatted as follows:
|
||||
// - `exact: "value"` for exact string match - `prefix: "value"`
|
||||
// for prefix-based match - `regex: "value"` for RE2 style
|
||||
// regex-based match (https://github.com/google/re2/wiki/Syntax).
|
||||
method?: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
|
||||
// The name assigned to a match.
|
||||
name?: string
|
||||
|
||||
// Specifies the ports on the host that is being addressed.
|
||||
port?: int
|
||||
|
||||
// Query parameters for matching.
|
||||
queryParams?: {
|
||||
[string]: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
}
|
||||
|
||||
// URI Scheme values are case-sensitive and formatted as follows:
|
||||
// - `exact: "value"` for exact string match - `prefix: "value"`
|
||||
// for prefix-based match - `regex: "value"` for RE2 style
|
||||
// regex-based match (https://github.com/google/re2/wiki/Syntax).
|
||||
scheme?: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
|
||||
// One or more labels that constrain the applicability of a rule
|
||||
// to source (client) workloads with the given labels.
|
||||
sourceLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Source namespace constraining the applicability of a rule to
|
||||
// workloads in that namespace.
|
||||
sourceNamespace?: string
|
||||
|
||||
// The human readable prefix to use when emitting statistics for
|
||||
// this route.
|
||||
statPrefix?: string
|
||||
|
||||
// URI to match values are case-sensitive and formatted as
|
||||
// follows: - `exact: "value"` for exact string match - `prefix:
|
||||
// "value"` for prefix-based match - `regex: "value"` for RE2
|
||||
// style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
uri?: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
|
||||
// withoutHeader has the same syntax with the header, but has
|
||||
// opposite meaning.
|
||||
withoutHeaders?: {
|
||||
[string]: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// Mirror HTTP traffic to a another destination in addition to
|
||||
// forwarding the requests to the intended destination.
|
||||
mirror?: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
mirror_percent?: null | int
|
||||
mirrorPercent?: null | int
|
||||
mirrorPercentage?: {
|
||||
value?: number
|
||||
}
|
||||
|
||||
// Specifies the destinations to mirror HTTP traffic in addition
|
||||
// to the original destination.
|
||||
mirrors?: [...{
|
||||
// Destination specifies the target of the mirror operation.
|
||||
destination: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
percentage?: {
|
||||
value?: number
|
||||
}
|
||||
}]
|
||||
|
||||
// The name assigned to the route for debugging purposes.
|
||||
name?: string
|
||||
|
||||
// A HTTP rule can either return a direct_response, redirect or
|
||||
// forward (default) traffic.
|
||||
redirect?: ({} | {
|
||||
port: _
|
||||
} | {
|
||||
derivePort: _
|
||||
}) & {
|
||||
// On a redirect, overwrite the Authority/Host portion of the URL
|
||||
// with this value.
|
||||
authority?: string
|
||||
|
||||
// On a redirect, dynamically set the port: *
|
||||
// FROM_PROTOCOL_DEFAULT: automatically set to 80 for HTTP and
|
||||
// 443 for HTTPS.
|
||||
derivePort?: "FROM_PROTOCOL_DEFAULT" | "FROM_REQUEST_PORT"
|
||||
|
||||
// On a redirect, overwrite the port portion of the URL with this
|
||||
// value.
|
||||
port?: int
|
||||
|
||||
// On a redirect, Specifies the HTTP status code to use in the
|
||||
// redirect response.
|
||||
redirectCode?: int
|
||||
|
||||
// On a redirect, overwrite the scheme portion of the URL with
|
||||
// this value.
|
||||
scheme?: string
|
||||
|
||||
// On a redirect, overwrite the Path portion of the URL with this
|
||||
// value.
|
||||
uri?: string
|
||||
}
|
||||
|
||||
// Retry policy for HTTP requests.
|
||||
retries?: {
|
||||
// Number of retries to be allowed for a given request.
|
||||
attempts?: int
|
||||
|
||||
// Timeout per attempt for a given request, including the initial
|
||||
// call and any retries.
|
||||
perTryTimeout?: string
|
||||
|
||||
// Specifies the conditions under which retry takes place.
|
||||
retryOn?: string
|
||||
|
||||
// Flag to specify whether the retries should retry to other
|
||||
// localities.
|
||||
retryRemoteLocalities?: null | bool
|
||||
}
|
||||
|
||||
// Rewrite HTTP URIs and Authority headers.
|
||||
rewrite?: {
|
||||
// rewrite the Authority/Host header with this value.
|
||||
authority?: string
|
||||
|
||||
// rewrite the path (or the prefix) portion of the URI with this
|
||||
// value.
|
||||
uri?: string
|
||||
|
||||
// rewrite the path portion of the URI with the specified regex.
|
||||
uriRegexRewrite?: {
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
match?: string
|
||||
|
||||
// The string that should replace into matching portions of
|
||||
// original URI.
|
||||
rewrite?: string
|
||||
}
|
||||
}
|
||||
|
||||
// A HTTP rule can either return a direct_response, redirect or
|
||||
// forward (default) traffic.
|
||||
route?: [...{
|
||||
// Destination uniquely identifies the instances of a service to
|
||||
// which the request/connection should be forwarded to.
|
||||
destination: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
headers?: {
|
||||
request?: {
|
||||
add?: {
|
||||
[string]: string
|
||||
}
|
||||
remove?: [...string]
|
||||
set?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
response?: {
|
||||
add?: {
|
||||
[string]: string
|
||||
}
|
||||
remove?: [...string]
|
||||
set?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Weight specifies the relative proportion of traffic to be
|
||||
// forwarded to the destination.
|
||||
weight?: int
|
||||
}]
|
||||
|
||||
// Timeout for HTTP requests, default is disabled.
|
||||
timeout?: string
|
||||
}]
|
||||
|
||||
// An ordered list of route rules for opaque TCP traffic.
|
||||
tcp?: [...{
|
||||
// Match conditions to be satisfied for the rule to be activated.
|
||||
match?: [...{
|
||||
// IPv4 or IPv6 ip addresses of destination with optional subnet.
|
||||
destinationSubnets?: [...string]
|
||||
|
||||
// Names of gateways where the rule should be applied.
|
||||
gateways?: [...string]
|
||||
|
||||
// Specifies the port on the host that is being addressed.
|
||||
port?: int
|
||||
|
||||
// One or more labels that constrain the applicability of a rule
|
||||
// to workloads with the given labels.
|
||||
sourceLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Source namespace constraining the applicability of a rule to
|
||||
// workloads in that namespace.
|
||||
sourceNamespace?: string
|
||||
sourceSubnet?: string
|
||||
}]
|
||||
|
||||
// The destination to which the connection should be forwarded to.
|
||||
route?: [...{
|
||||
// Destination uniquely identifies the instances of a service to
|
||||
// which the request/connection should be forwarded to.
|
||||
destination: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
|
||||
// Weight specifies the relative proportion of traffic to be
|
||||
// forwarded to the destination.
|
||||
weight?: int
|
||||
}]
|
||||
}]
|
||||
|
||||
// An ordered list of route rule for non-terminated TLS & HTTPS
|
||||
// traffic.
|
||||
tls?: [...{
|
||||
// Match conditions to be satisfied for the rule to be activated.
|
||||
match: [...{
|
||||
// IPv4 or IPv6 ip addresses of destination with optional subnet.
|
||||
destinationSubnets?: [...string]
|
||||
|
||||
// Names of gateways where the rule should be applied.
|
||||
gateways?: [...string]
|
||||
|
||||
// Specifies the port on the host that is being addressed.
|
||||
port?: int
|
||||
|
||||
// SNI (server name indicator) to match on.
|
||||
sniHosts: [...string]
|
||||
|
||||
// One or more labels that constrain the applicability of a rule
|
||||
// to workloads with the given labels.
|
||||
sourceLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Source namespace constraining the applicability of a rule to
|
||||
// workloads in that namespace.
|
||||
sourceNamespace?: string
|
||||
}]
|
||||
|
||||
// The destination to which the connection should be forwarded to.
|
||||
route?: [...{
|
||||
// Destination uniquely identifies the instances of a service to
|
||||
// which the request/connection should be forwarded to.
|
||||
destination: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
|
||||
// Weight specifies the relative proportion of traffic to be
|
||||
// forwarded to the destination.
|
||||
weight?: int
|
||||
}]
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,584 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#VirtualService: {
|
||||
// Configuration affecting label/content routing, sni routing,
|
||||
// etc. See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/virtual-service.html
|
||||
spec!: #VirtualServiceSpec
|
||||
apiVersion: "networking.istio.io/v1beta1"
|
||||
kind: "VirtualService"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting label/content routing, sni routing,
|
||||
// etc. See more details at:
|
||||
// https://istio.io/docs/reference/config/networking/virtual-service.html
|
||||
#VirtualServiceSpec: {
|
||||
// A list of namespaces to which this virtual service is exported.
|
||||
exportTo?: [...string]
|
||||
|
||||
// The names of gateways and sidecars that should apply these
|
||||
// routes.
|
||||
gateways?: [...string]
|
||||
|
||||
// The destination hosts to which traffic is being sent.
|
||||
hosts?: [...string]
|
||||
|
||||
// An ordered list of route rules for HTTP traffic.
|
||||
http?: [...{
|
||||
// Cross-Origin Resource Sharing policy (CORS).
|
||||
corsPolicy?: {
|
||||
// Indicates whether the caller is allowed to send the actual
|
||||
// request (not the preflight) using credentials.
|
||||
allowCredentials?: null | bool
|
||||
|
||||
// List of HTTP headers that can be used when requesting the
|
||||
// resource.
|
||||
allowHeaders?: [...string]
|
||||
|
||||
// List of HTTP methods allowed to access the resource.
|
||||
allowMethods?: [...string]
|
||||
allowOrigin?: [...string]
|
||||
|
||||
// String patterns that match allowed origins.
|
||||
allowOrigins?: [...({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}]
|
||||
|
||||
// A list of HTTP headers that the browsers are allowed to access.
|
||||
exposeHeaders?: [...string]
|
||||
|
||||
// Specifies how long the results of a preflight request can be
|
||||
// cached.
|
||||
maxAge?: string
|
||||
}
|
||||
|
||||
// Delegate is used to specify the particular VirtualService which
|
||||
// can be used to define delegate HTTPRoute.
|
||||
delegate?: {
|
||||
// Name specifies the name of the delegate VirtualService.
|
||||
name?: string
|
||||
|
||||
// Namespace specifies the namespace where the delegate
|
||||
// VirtualService resides.
|
||||
namespace?: string
|
||||
}
|
||||
|
||||
// A HTTP rule can either return a direct_response, redirect or
|
||||
// forward (default) traffic.
|
||||
directResponse?: {
|
||||
// Specifies the content of the response body.
|
||||
body?: ({} | {
|
||||
string: _
|
||||
} | {
|
||||
bytes: _
|
||||
}) & {
|
||||
// response body as base64 encoded bytes.
|
||||
bytes?: string
|
||||
string?: string
|
||||
}
|
||||
|
||||
// Specifies the HTTP response status to be returned.
|
||||
status: int
|
||||
}
|
||||
|
||||
// Fault injection policy to apply on HTTP traffic at the client
|
||||
// side.
|
||||
fault?: {
|
||||
// Abort Http request attempts and return error codes back to
|
||||
// downstream service, giving the impression that the upstream
|
||||
// service is faulty.
|
||||
abort?: ({} | {
|
||||
httpStatus: _
|
||||
} | {
|
||||
grpcStatus: _
|
||||
} | {
|
||||
http2Error: _
|
||||
}) & {
|
||||
// GRPC status code to use to abort the request.
|
||||
grpcStatus?: string
|
||||
http2Error?: string
|
||||
|
||||
// HTTP status code to use to abort the Http request.
|
||||
httpStatus?: int
|
||||
percentage?: {
|
||||
value?: number
|
||||
}
|
||||
}
|
||||
|
||||
// Delay requests before forwarding, emulating various failures
|
||||
// such as network issues, overloaded upstream service, etc.
|
||||
delay?: ({} | {
|
||||
fixedDelay: _
|
||||
} | {
|
||||
exponentialDelay: _
|
||||
}) & {
|
||||
exponentialDelay?: string
|
||||
|
||||
// Add a fixed delay before forwarding the request.
|
||||
fixedDelay?: string
|
||||
|
||||
// Percentage of requests on which the delay will be injected
|
||||
// (0-100).
|
||||
percent?: int
|
||||
percentage?: {
|
||||
value?: number
|
||||
}
|
||||
}
|
||||
}
|
||||
headers?: {
|
||||
request?: {
|
||||
add?: {
|
||||
[string]: string
|
||||
}
|
||||
remove?: [...string]
|
||||
set?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
response?: {
|
||||
add?: {
|
||||
[string]: string
|
||||
}
|
||||
remove?: [...string]
|
||||
set?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Match conditions to be satisfied for the rule to be activated.
|
||||
match?: [...{
|
||||
// HTTP Authority values are case-sensitive and formatted as
|
||||
// follows: - `exact: "value"` for exact string match - `prefix:
|
||||
// "value"` for prefix-based match - `regex: "value"` for RE2
|
||||
// style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
authority?: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
|
||||
// Names of gateways where the rule should be applied.
|
||||
gateways?: [...string]
|
||||
|
||||
// The header keys must be lowercase and use hyphen as the
|
||||
// separator, e.g.
|
||||
headers?: {
|
||||
[string]: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
}
|
||||
|
||||
// Flag to specify whether the URI matching should be
|
||||
// case-insensitive.
|
||||
ignoreUriCase?: bool
|
||||
|
||||
// HTTP Method values are case-sensitive and formatted as follows:
|
||||
// - `exact: "value"` for exact string match - `prefix: "value"`
|
||||
// for prefix-based match - `regex: "value"` for RE2 style
|
||||
// regex-based match (https://github.com/google/re2/wiki/Syntax).
|
||||
method?: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
|
||||
// The name assigned to a match.
|
||||
name?: string
|
||||
|
||||
// Specifies the ports on the host that is being addressed.
|
||||
port?: int
|
||||
|
||||
// Query parameters for matching.
|
||||
queryParams?: {
|
||||
[string]: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
}
|
||||
|
||||
// URI Scheme values are case-sensitive and formatted as follows:
|
||||
// - `exact: "value"` for exact string match - `prefix: "value"`
|
||||
// for prefix-based match - `regex: "value"` for RE2 style
|
||||
// regex-based match (https://github.com/google/re2/wiki/Syntax).
|
||||
scheme?: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
|
||||
// One or more labels that constrain the applicability of a rule
|
||||
// to source (client) workloads with the given labels.
|
||||
sourceLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Source namespace constraining the applicability of a rule to
|
||||
// workloads in that namespace.
|
||||
sourceNamespace?: string
|
||||
|
||||
// The human readable prefix to use when emitting statistics for
|
||||
// this route.
|
||||
statPrefix?: string
|
||||
|
||||
// URI to match values are case-sensitive and formatted as
|
||||
// follows: - `exact: "value"` for exact string match - `prefix:
|
||||
// "value"` for prefix-based match - `regex: "value"` for RE2
|
||||
// style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
uri?: ({} | {
|
||||
exact: _
|
||||
} | {
|
||||
prefix: _
|
||||
} | {
|
||||
regex: _
|
||||
}) & {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
|
||||
// withoutHeader has the same syntax with the header, but has
|
||||
// opposite meaning.
|
||||
withoutHeaders?: {
|
||||
[string]: {
|
||||
exact?: string
|
||||
prefix?: string
|
||||
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
regex?: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// Mirror HTTP traffic to a another destination in addition to
|
||||
// forwarding the requests to the intended destination.
|
||||
mirror?: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
mirror_percent?: null | int
|
||||
mirrorPercent?: null | int
|
||||
mirrorPercentage?: {
|
||||
value?: number
|
||||
}
|
||||
|
||||
// Specifies the destinations to mirror HTTP traffic in addition
|
||||
// to the original destination.
|
||||
mirrors?: [...{
|
||||
// Destination specifies the target of the mirror operation.
|
||||
destination: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
percentage?: {
|
||||
value?: number
|
||||
}
|
||||
}]
|
||||
|
||||
// The name assigned to the route for debugging purposes.
|
||||
name?: string
|
||||
|
||||
// A HTTP rule can either return a direct_response, redirect or
|
||||
// forward (default) traffic.
|
||||
redirect?: {
|
||||
// On a redirect, overwrite the Authority/Host portion of the URL
|
||||
// with this value.
|
||||
authority?: string
|
||||
|
||||
// On a redirect, dynamically set the port: *
|
||||
// FROM_PROTOCOL_DEFAULT: automatically set to 80 for HTTP and
|
||||
// 443 for HTTPS.
|
||||
derivePort?: "FROM_PROTOCOL_DEFAULT" | "FROM_REQUEST_PORT"
|
||||
|
||||
// On a redirect, overwrite the port portion of the URL with this
|
||||
// value.
|
||||
port?: int
|
||||
|
||||
// On a redirect, Specifies the HTTP status code to use in the
|
||||
// redirect response.
|
||||
redirectCode?: int
|
||||
|
||||
// On a redirect, overwrite the scheme portion of the URL with
|
||||
// this value.
|
||||
scheme?: string
|
||||
|
||||
// On a redirect, overwrite the Path portion of the URL with this
|
||||
// value.
|
||||
uri?: string
|
||||
}
|
||||
|
||||
// Retry policy for HTTP requests.
|
||||
retries?: {
|
||||
// Number of retries to be allowed for a given request.
|
||||
attempts?: int
|
||||
|
||||
// Timeout per attempt for a given request, including the initial
|
||||
// call and any retries.
|
||||
perTryTimeout?: string
|
||||
|
||||
// Specifies the conditions under which retry takes place.
|
||||
retryOn?: string
|
||||
|
||||
// Flag to specify whether the retries should retry to other
|
||||
// localities.
|
||||
retryRemoteLocalities?: null | bool
|
||||
}
|
||||
|
||||
// Rewrite HTTP URIs and Authority headers.
|
||||
rewrite?: {
|
||||
// rewrite the Authority/Host header with this value.
|
||||
authority?: string
|
||||
|
||||
// rewrite the path (or the prefix) portion of the URI with this
|
||||
// value.
|
||||
uri?: string
|
||||
|
||||
// rewrite the path portion of the URI with the specified regex.
|
||||
uriRegexRewrite?: {
|
||||
// RE2 style regex-based match
|
||||
// (https://github.com/google/re2/wiki/Syntax).
|
||||
match?: string
|
||||
|
||||
// The string that should replace into matching portions of
|
||||
// original URI.
|
||||
rewrite?: string
|
||||
}
|
||||
}
|
||||
|
||||
// A HTTP rule can either return a direct_response, redirect or
|
||||
// forward (default) traffic.
|
||||
route?: [...{
|
||||
// Destination uniquely identifies the instances of a service to
|
||||
// which the request/connection should be forwarded to.
|
||||
destination: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
headers?: {
|
||||
request?: {
|
||||
add?: {
|
||||
[string]: string
|
||||
}
|
||||
remove?: [...string]
|
||||
set?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
response?: {
|
||||
add?: {
|
||||
[string]: string
|
||||
}
|
||||
remove?: [...string]
|
||||
set?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Weight specifies the relative proportion of traffic to be
|
||||
// forwarded to the destination.
|
||||
weight?: int
|
||||
}]
|
||||
|
||||
// Timeout for HTTP requests, default is disabled.
|
||||
timeout?: string
|
||||
}]
|
||||
|
||||
// An ordered list of route rules for opaque TCP traffic.
|
||||
tcp?: [...{
|
||||
// Match conditions to be satisfied for the rule to be activated.
|
||||
match?: [...{
|
||||
// IPv4 or IPv6 ip addresses of destination with optional subnet.
|
||||
destinationSubnets?: [...string]
|
||||
|
||||
// Names of gateways where the rule should be applied.
|
||||
gateways?: [...string]
|
||||
|
||||
// Specifies the port on the host that is being addressed.
|
||||
port?: int
|
||||
|
||||
// One or more labels that constrain the applicability of a rule
|
||||
// to workloads with the given labels.
|
||||
sourceLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Source namespace constraining the applicability of a rule to
|
||||
// workloads in that namespace.
|
||||
sourceNamespace?: string
|
||||
sourceSubnet?: string
|
||||
}]
|
||||
|
||||
// The destination to which the connection should be forwarded to.
|
||||
route?: [...{
|
||||
// Destination uniquely identifies the instances of a service to
|
||||
// which the request/connection should be forwarded to.
|
||||
destination: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
|
||||
// Weight specifies the relative proportion of traffic to be
|
||||
// forwarded to the destination.
|
||||
weight?: int
|
||||
}]
|
||||
}]
|
||||
|
||||
// An ordered list of route rule for non-terminated TLS & HTTPS
|
||||
// traffic.
|
||||
tls?: [...{
|
||||
// Match conditions to be satisfied for the rule to be activated.
|
||||
match: [...{
|
||||
// IPv4 or IPv6 ip addresses of destination with optional subnet.
|
||||
destinationSubnets?: [...string]
|
||||
|
||||
// Names of gateways where the rule should be applied.
|
||||
gateways?: [...string]
|
||||
|
||||
// Specifies the port on the host that is being addressed.
|
||||
port?: int
|
||||
|
||||
// SNI (server name indicator) to match on.
|
||||
sniHosts: [...string]
|
||||
|
||||
// One or more labels that constrain the applicability of a rule
|
||||
// to workloads with the given labels.
|
||||
sourceLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Source namespace constraining the applicability of a rule to
|
||||
// workloads in that namespace.
|
||||
sourceNamespace?: string
|
||||
}]
|
||||
|
||||
// The destination to which the connection should be forwarded to.
|
||||
route?: [...{
|
||||
// Destination uniquely identifies the instances of a service to
|
||||
// which the request/connection should be forwarded to.
|
||||
destination: {
|
||||
// The name of a service from the service registry.
|
||||
host: string
|
||||
port?: {
|
||||
number?: int
|
||||
}
|
||||
|
||||
// The name of a subset within the service.
|
||||
subset?: string
|
||||
}
|
||||
|
||||
// Weight specifies the relative proportion of traffic to be
|
||||
// forwarded to the destination.
|
||||
weight?: int
|
||||
}]
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import "strings"
|
||||
|
||||
#WorkloadEntry: {
|
||||
// Configuration affecting VMs onboarded into the mesh. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/networking/workload-entry.html
|
||||
spec!: #WorkloadEntrySpec
|
||||
apiVersion: "networking.istio.io/v1alpha3"
|
||||
kind: "WorkloadEntry"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting VMs onboarded into the mesh. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/networking/workload-entry.html
|
||||
#WorkloadEntrySpec: {
|
||||
// Address associated with the network endpoint without the port.
|
||||
address?: string
|
||||
|
||||
// One or more labels associated with the endpoint.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// The locality associated with the endpoint.
|
||||
locality?: string
|
||||
|
||||
// Network enables Istio to group endpoints resident in the same
|
||||
// L3 domain/network.
|
||||
network?: string
|
||||
|
||||
// Set of ports associated with the endpoint.
|
||||
ports?: {
|
||||
[string]: int
|
||||
}
|
||||
|
||||
// The service account associated with the workload if a sidecar
|
||||
// is present in the workload.
|
||||
serviceAccount?: string
|
||||
|
||||
// The load balancing weight associated with the endpoint.
|
||||
weight?: int
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#WorkloadEntry: {
|
||||
// Configuration affecting VMs onboarded into the mesh. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/networking/workload-entry.html
|
||||
spec!: #WorkloadEntrySpec
|
||||
apiVersion: "networking.istio.io/v1beta1"
|
||||
kind: "WorkloadEntry"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration affecting VMs onboarded into the mesh. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/networking/workload-entry.html
|
||||
#WorkloadEntrySpec: {
|
||||
// Address associated with the network endpoint without the port.
|
||||
address?: string
|
||||
|
||||
// One or more labels associated with the endpoint.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// The locality associated with the endpoint.
|
||||
locality?: string
|
||||
|
||||
// Network enables Istio to group endpoints resident in the same
|
||||
// L3 domain/network.
|
||||
network?: string
|
||||
|
||||
// Set of ports associated with the endpoint.
|
||||
ports?: {
|
||||
[string]: int
|
||||
}
|
||||
|
||||
// The service account associated with the workload if a sidecar
|
||||
// is present in the workload.
|
||||
serviceAccount?: string
|
||||
|
||||
// The load balancing weight associated with the endpoint.
|
||||
weight?: int
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import "strings"
|
||||
|
||||
#WorkloadGroup: {
|
||||
// Describes a collection of workload instances. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/networking/workload-group.html
|
||||
spec!: #WorkloadGroupSpec
|
||||
apiVersion: "networking.istio.io/v1alpha3"
|
||||
kind: "WorkloadGroup"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Describes a collection of workload instances. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/networking/workload-group.html
|
||||
#WorkloadGroupSpec: {
|
||||
// Metadata that will be used for all corresponding
|
||||
// `WorkloadEntries`.
|
||||
metadata?: {
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// `ReadinessProbe` describes the configuration the user must
|
||||
// provide for healthchecking on their workload.
|
||||
probe?: ({} | {
|
||||
httpGet: _
|
||||
} | {
|
||||
tcpSocket: _
|
||||
} | {
|
||||
exec: _
|
||||
}) & {
|
||||
exec?: {
|
||||
// Command to run.
|
||||
command?: [...string]
|
||||
}
|
||||
|
||||
// Minimum consecutive failures for the probe to be considered
|
||||
// failed after having succeeded.
|
||||
failureThreshold?: int
|
||||
|
||||
// `httpGet` is performed to a given endpoint and the status/able
|
||||
// to connect determines health.
|
||||
httpGet?: {
|
||||
// Host name to connect to, defaults to the pod IP.
|
||||
host?: string
|
||||
|
||||
// Headers the proxy will pass on to make the request.
|
||||
httpHeaders?: [...{
|
||||
name?: string
|
||||
value?: string
|
||||
}]
|
||||
|
||||
// Path to access on the HTTP server.
|
||||
path?: string
|
||||
|
||||
// Port on which the endpoint lives.
|
||||
port: int
|
||||
scheme?: string
|
||||
}
|
||||
|
||||
// Number of seconds after the container has started before
|
||||
// readiness probes are initiated.
|
||||
initialDelaySeconds?: int
|
||||
|
||||
// How often (in seconds) to perform the probe.
|
||||
periodSeconds?: int
|
||||
|
||||
// Minimum consecutive successes for the probe to be considered
|
||||
// successful after having failed.
|
||||
successThreshold?: int
|
||||
|
||||
// Health is determined by if the proxy is able to connect.
|
||||
tcpSocket?: {
|
||||
host?: string
|
||||
port: int
|
||||
}
|
||||
|
||||
// Number of seconds after which the probe times out.
|
||||
timeoutSeconds?: int
|
||||
}
|
||||
|
||||
// Template to be used for the generation of `WorkloadEntry`
|
||||
// resources that belong to this `WorkloadGroup`.
|
||||
template: {
|
||||
// Address associated with the network endpoint without the port.
|
||||
address?: string
|
||||
|
||||
// One or more labels associated with the endpoint.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// The locality associated with the endpoint.
|
||||
locality?: string
|
||||
|
||||
// Network enables Istio to group endpoints resident in the same
|
||||
// L3 domain/network.
|
||||
network?: string
|
||||
|
||||
// Set of ports associated with the endpoint.
|
||||
ports?: {
|
||||
[string]: int
|
||||
}
|
||||
|
||||
// The service account associated with the workload if a sidecar
|
||||
// is present in the workload.
|
||||
serviceAccount?: string
|
||||
|
||||
// The load balancing weight associated with the endpoint.
|
||||
weight?: int
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#WorkloadGroup: {
|
||||
// `WorkloadGroup` enables specifying the properties of a single
|
||||
// workload for bootstrap and provides a template for
|
||||
// `WorkloadEntry`, similar to how `Deployment` specifies
|
||||
// properties of workloads via `Pod` templates.
|
||||
spec!: #WorkloadGroupSpec
|
||||
apiVersion: "networking.istio.io/v1beta1"
|
||||
kind: "WorkloadGroup"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// `WorkloadGroup` enables specifying the properties of a single
|
||||
// workload for bootstrap and provides a template for
|
||||
// `WorkloadEntry`, similar to how `Deployment` specifies
|
||||
// properties of workloads via `Pod` templates.
|
||||
#WorkloadGroupSpec: {
|
||||
// Metadata that will be used for all corresponding
|
||||
// `WorkloadEntries`.
|
||||
metadata?: {
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// `ReadinessProbe` describes the configuration the user must
|
||||
// provide for healthchecking on their workload.
|
||||
probe?: ({} | {
|
||||
httpGet: _
|
||||
} | {
|
||||
tcpSocket: _
|
||||
} | {
|
||||
exec: _
|
||||
}) & {
|
||||
exec?: {
|
||||
// Command to run.
|
||||
command?: [...string]
|
||||
}
|
||||
|
||||
// Minimum consecutive failures for the probe to be considered
|
||||
// failed after having succeeded.
|
||||
failureThreshold?: int
|
||||
|
||||
// `httpGet` is performed to a given endpoint and the status/able
|
||||
// to connect determines health.
|
||||
httpGet?: {
|
||||
// Host name to connect to, defaults to the pod IP.
|
||||
host?: string
|
||||
|
||||
// Headers the proxy will pass on to make the request.
|
||||
httpHeaders?: [...{
|
||||
name?: string
|
||||
value?: string
|
||||
}]
|
||||
|
||||
// Path to access on the HTTP server.
|
||||
path?: string
|
||||
|
||||
// Port on which the endpoint lives.
|
||||
port: int
|
||||
scheme?: string
|
||||
}
|
||||
|
||||
// Number of seconds after the container has started before
|
||||
// readiness probes are initiated.
|
||||
initialDelaySeconds?: int
|
||||
|
||||
// How often (in seconds) to perform the probe.
|
||||
periodSeconds?: int
|
||||
|
||||
// Minimum consecutive successes for the probe to be considered
|
||||
// successful after having failed.
|
||||
successThreshold?: int
|
||||
|
||||
// Health is determined by if the proxy is able to connect.
|
||||
tcpSocket?: {
|
||||
host?: string
|
||||
port: int
|
||||
}
|
||||
|
||||
// Number of seconds after which the probe times out.
|
||||
timeoutSeconds?: int
|
||||
}
|
||||
|
||||
// Template to be used for the generation of `WorkloadEntry`
|
||||
// resources that belong to this `WorkloadGroup`.
|
||||
template: {
|
||||
// Address associated with the network endpoint without the port.
|
||||
address?: string
|
||||
|
||||
// One or more labels associated with the endpoint.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// The locality associated with the endpoint.
|
||||
locality?: string
|
||||
|
||||
// Network enables Istio to group endpoints resident in the same
|
||||
// L3 domain/network.
|
||||
network?: string
|
||||
|
||||
// Set of ports associated with the endpoint.
|
||||
ports?: {
|
||||
[string]: int
|
||||
}
|
||||
|
||||
// The service account associated with the workload if a sidecar
|
||||
// is present in the workload.
|
||||
serviceAccount?: string
|
||||
|
||||
// The load balancing weight associated with the endpoint.
|
||||
weight?: int
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,975 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/core2/components/prod-pgo-crds/prod-pgo-crds.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
// PGAdmin is the Schema for the pgadmins API
|
||||
#PGAdmin: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "postgres-operator.crunchydata.com/v1beta1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "PGAdmin"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// PGAdminSpec defines the desired state of PGAdmin
|
||||
spec!: #PGAdminSpec
|
||||
}
|
||||
|
||||
// PGAdminSpec defines the desired state of PGAdmin
|
||||
#PGAdminSpec: {
|
||||
// Scheduling constraints of the PGAdmin pod. More info:
|
||||
// https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node
|
||||
affinity?: {
|
||||
// Describes node affinity scheduling rules for the pod.
|
||||
nodeAffinity?: {
|
||||
// The scheduler will prefer to schedule pods to nodes that
|
||||
// satisfy the affinity expressions specified by this field, but
|
||||
// it may choose a node that violates one or more of the
|
||||
// expressions. The node that is most preferred is the one with
|
||||
// the greatest sum of weights, i.e. for each node that meets all
|
||||
// of the scheduling requirements (resource request,
|
||||
// requiredDuringScheduling affinity expressions, etc.), compute
|
||||
// a sum by iterating through the elements of this field and
|
||||
// adding "weight" to the sum if the node matches the
|
||||
// corresponding matchExpressions; the node(s) with the highest
|
||||
// sum are the most preferred.
|
||||
preferredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// A node selector term, associated with the corresponding weight.
|
||||
preference: {
|
||||
// A list of node selector requirements by node's labels.
|
||||
matchExpressions?: [...{
|
||||
// The label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// Represents a key's relationship to a set of values. Valid
|
||||
// operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
|
||||
operator: string
|
||||
|
||||
// An array of string values. If the operator is In or NotIn, the
|
||||
// values array must be non-empty. If the operator is Exists or
|
||||
// DoesNotExist, the values array must be empty. If the operator
|
||||
// is Gt or Lt, the values array must have a single element,
|
||||
// which will be interpreted as an integer. This array is
|
||||
// replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// A list of node selector requirements by node's fields.
|
||||
matchFields?: [...{
|
||||
// The label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// Represents a key's relationship to a set of values. Valid
|
||||
// operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
|
||||
operator: string
|
||||
|
||||
// An array of string values. If the operator is In or NotIn, the
|
||||
// values array must be non-empty. If the operator is Exists or
|
||||
// DoesNotExist, the values array must be empty. If the operator
|
||||
// is Gt or Lt, the values array must have a single element,
|
||||
// which will be interpreted as an integer. This array is
|
||||
// replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
}
|
||||
|
||||
// Weight associated with matching the corresponding
|
||||
// nodeSelectorTerm, in the range 1-100.
|
||||
weight: int
|
||||
}]
|
||||
requiredDuringSchedulingIgnoredDuringExecution?: {
|
||||
// Required. A list of node selector terms. The terms are ORed.
|
||||
nodeSelectorTerms: [...{
|
||||
// A list of node selector requirements by node's labels.
|
||||
matchExpressions?: [...{
|
||||
// The label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// Represents a key's relationship to a set of values. Valid
|
||||
// operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
|
||||
operator: string
|
||||
|
||||
// An array of string values. If the operator is In or NotIn, the
|
||||
// values array must be non-empty. If the operator is Exists or
|
||||
// DoesNotExist, the values array must be empty. If the operator
|
||||
// is Gt or Lt, the values array must have a single element,
|
||||
// which will be interpreted as an integer. This array is
|
||||
// replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// A list of node selector requirements by node's fields.
|
||||
matchFields?: [...{
|
||||
// The label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// Represents a key's relationship to a set of values. Valid
|
||||
// operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
|
||||
operator: string
|
||||
|
||||
// An array of string values. If the operator is In or NotIn, the
|
||||
// values array must be non-empty. If the operator is Exists or
|
||||
// DoesNotExist, the values array must be empty. If the operator
|
||||
// is Gt or Lt, the values array must have a single element,
|
||||
// which will be interpreted as an integer. This array is
|
||||
// replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
// Describes pod affinity scheduling rules (e.g. co-locate this
|
||||
// pod in the same node, zone, etc. as some other pod(s)).
|
||||
podAffinity?: {
|
||||
// The scheduler will prefer to schedule pods to nodes that
|
||||
// satisfy the affinity expressions specified by this field, but
|
||||
// it may choose a node that violates one or more of the
|
||||
// expressions. The node that is most preferred is the one with
|
||||
// the greatest sum of weights, i.e. for each node that meets all
|
||||
// of the scheduling requirements (resource request,
|
||||
// requiredDuringScheduling affinity expressions, etc.), compute
|
||||
// a sum by iterating through the elements of this field and
|
||||
// adding "weight" to the sum if the node has pods which matches
|
||||
// the corresponding podAffinityTerm; the node(s) with the
|
||||
// highest sum are the most preferred.
|
||||
preferredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// Required. A pod affinity term, associated with the
|
||||
// corresponding weight.
|
||||
podAffinityTerm: {
|
||||
// A label query over a set of resources, in this case pods.
|
||||
labelSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// A label query over the set of namespaces that the term applies
|
||||
// to. The term is applied to the union of the namespaces
|
||||
// selected by this field and the ones listed in the namespaces
|
||||
// field. null selector and null or empty namespaces list means
|
||||
// "this pod's namespace". An empty selector ({}) matches all
|
||||
// namespaces.
|
||||
namespaceSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// namespaces specifies a static list of namespace names that the
|
||||
// term applies to. The term is applied to the union of the
|
||||
// namespaces listed in this field and the ones selected by
|
||||
// namespaceSelector. null or empty namespaces list and null
|
||||
// namespaceSelector means "this pod's namespace".
|
||||
namespaces?: [...string]
|
||||
|
||||
// This pod should be co-located (affinity) or not co-located
|
||||
// (anti-affinity) with the pods matching the labelSelector in
|
||||
// the specified namespaces, where co-located is defined as
|
||||
// running on a node whose value of the label with key
|
||||
// topologyKey matches that of any node on which any of the
|
||||
// selected pods is running. Empty topologyKey is not allowed.
|
||||
topologyKey: string
|
||||
}
|
||||
|
||||
// weight associated with matching the corresponding
|
||||
// podAffinityTerm, in the range 1-100.
|
||||
weight: int
|
||||
}]
|
||||
|
||||
// If the affinity requirements specified by this field are not
|
||||
// met at scheduling time, the pod will not be scheduled onto the
|
||||
// node. If the affinity requirements specified by this field
|
||||
// cease to be met at some point during pod execution (e.g. due
|
||||
// to a pod label update), the system may or may not try to
|
||||
// eventually evict the pod from its node. When there are
|
||||
// multiple elements, the lists of nodes corresponding to each
|
||||
// podAffinityTerm are intersected, i.e. all terms must be
|
||||
// satisfied.
|
||||
requiredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// A label query over a set of resources, in this case pods.
|
||||
labelSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// A label query over the set of namespaces that the term applies
|
||||
// to. The term is applied to the union of the namespaces
|
||||
// selected by this field and the ones listed in the namespaces
|
||||
// field. null selector and null or empty namespaces list means
|
||||
// "this pod's namespace". An empty selector ({}) matches all
|
||||
// namespaces.
|
||||
namespaceSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// namespaces specifies a static list of namespace names that the
|
||||
// term applies to. The term is applied to the union of the
|
||||
// namespaces listed in this field and the ones selected by
|
||||
// namespaceSelector. null or empty namespaces list and null
|
||||
// namespaceSelector means "this pod's namespace".
|
||||
namespaces?: [...string]
|
||||
|
||||
// This pod should be co-located (affinity) or not co-located
|
||||
// (anti-affinity) with the pods matching the labelSelector in
|
||||
// the specified namespaces, where co-located is defined as
|
||||
// running on a node whose value of the label with key
|
||||
// topologyKey matches that of any node on which any of the
|
||||
// selected pods is running. Empty topologyKey is not allowed.
|
||||
topologyKey: string
|
||||
}]
|
||||
}
|
||||
|
||||
// Describes pod anti-affinity scheduling rules (e.g. avoid
|
||||
// putting this pod in the same node, zone, etc. as some other
|
||||
// pod(s)).
|
||||
podAntiAffinity?: {
|
||||
// The scheduler will prefer to schedule pods to nodes that
|
||||
// satisfy the anti-affinity expressions specified by this field,
|
||||
// but it may choose a node that violates one or more of the
|
||||
// expressions. The node that is most preferred is the one with
|
||||
// the greatest sum of weights, i.e. for each node that meets all
|
||||
// of the scheduling requirements (resource request,
|
||||
// requiredDuringScheduling anti-affinity expressions, etc.),
|
||||
// compute a sum by iterating through the elements of this field
|
||||
// and adding "weight" to the sum if the node has pods which
|
||||
// matches the corresponding podAffinityTerm; the node(s) with
|
||||
// the highest sum are the most preferred.
|
||||
preferredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// Required. A pod affinity term, associated with the
|
||||
// corresponding weight.
|
||||
podAffinityTerm: {
|
||||
// A label query over a set of resources, in this case pods.
|
||||
labelSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// A label query over the set of namespaces that the term applies
|
||||
// to. The term is applied to the union of the namespaces
|
||||
// selected by this field and the ones listed in the namespaces
|
||||
// field. null selector and null or empty namespaces list means
|
||||
// "this pod's namespace". An empty selector ({}) matches all
|
||||
// namespaces.
|
||||
namespaceSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// namespaces specifies a static list of namespace names that the
|
||||
// term applies to. The term is applied to the union of the
|
||||
// namespaces listed in this field and the ones selected by
|
||||
// namespaceSelector. null or empty namespaces list and null
|
||||
// namespaceSelector means "this pod's namespace".
|
||||
namespaces?: [...string]
|
||||
|
||||
// This pod should be co-located (affinity) or not co-located
|
||||
// (anti-affinity) with the pods matching the labelSelector in
|
||||
// the specified namespaces, where co-located is defined as
|
||||
// running on a node whose value of the label with key
|
||||
// topologyKey matches that of any node on which any of the
|
||||
// selected pods is running. Empty topologyKey is not allowed.
|
||||
topologyKey: string
|
||||
}
|
||||
|
||||
// weight associated with matching the corresponding
|
||||
// podAffinityTerm, in the range 1-100.
|
||||
weight: int
|
||||
}]
|
||||
|
||||
// If the anti-affinity requirements specified by this field are
|
||||
// not met at scheduling time, the pod will not be scheduled onto
|
||||
// the node. If the anti-affinity requirements specified by this
|
||||
// field cease to be met at some point during pod execution (e.g.
|
||||
// due to a pod label update), the system may or may not try to
|
||||
// eventually evict the pod from its node. When there are
|
||||
// multiple elements, the lists of nodes corresponding to each
|
||||
// podAffinityTerm are intersected, i.e. all terms must be
|
||||
// satisfied.
|
||||
requiredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// A label query over a set of resources, in this case pods.
|
||||
labelSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// A label query over the set of namespaces that the term applies
|
||||
// to. The term is applied to the union of the namespaces
|
||||
// selected by this field and the ones listed in the namespaces
|
||||
// field. null selector and null or empty namespaces list means
|
||||
// "this pod's namespace". An empty selector ({}) matches all
|
||||
// namespaces.
|
||||
namespaceSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// namespaces specifies a static list of namespace names that the
|
||||
// term applies to. The term is applied to the union of the
|
||||
// namespaces listed in this field and the ones selected by
|
||||
// namespaceSelector. null or empty namespaces list and null
|
||||
// namespaceSelector means "this pod's namespace".
|
||||
namespaces?: [...string]
|
||||
|
||||
// This pod should be co-located (affinity) or not co-located
|
||||
// (anti-affinity) with the pods matching the labelSelector in
|
||||
// the specified namespaces, where co-located is defined as
|
||||
// running on a node whose value of the label with key
|
||||
// topologyKey matches that of any node on which any of the
|
||||
// selected pods is running. Empty topologyKey is not allowed.
|
||||
topologyKey: string
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration settings for the pgAdmin process. Changes to any
|
||||
// of these values will be loaded without validation. Be careful,
|
||||
// as you may put pgAdmin into an unusable state.
|
||||
config?: {
|
||||
// Files allows the user to mount projected volumes into the
|
||||
// pgAdmin container so that files can be referenced by pgAdmin
|
||||
// as needed.
|
||||
files?: [...{
|
||||
// configMap information about the configMap data to project
|
||||
configMap?: {
|
||||
// items if unspecified, each key-value pair in the Data field of
|
||||
// the referenced ConfigMap will be projected into the volume as
|
||||
// a file whose name is the key and content is the value. If
|
||||
// specified, the listed keys will be projected into the
|
||||
// specified paths, and unlisted keys will not be present. If a
|
||||
// key is specified which is not present in the ConfigMap, the
|
||||
// volume setup will error unless it is marked optional. Paths
|
||||
// must be relative and may not contain the '..' path or start
|
||||
// with '..'.
|
||||
items?: [...{
|
||||
// key is the key to project.
|
||||
key: string
|
||||
|
||||
// mode is Optional: mode bits used to set permissions on this
|
||||
// file. Must be an octal value between 0000 and 0777 or a
|
||||
// decimal value between 0 and 511. YAML accepts both octal and
|
||||
// decimal values, JSON requires decimal values for mode bits. If
|
||||
// not specified, the volume defaultMode will be used. This might
|
||||
// be in conflict with other options that affect the file mode,
|
||||
// like fsGroup, and the result can be other mode bits set.
|
||||
mode?: int
|
||||
|
||||
// path is the relative path of the file to map the key to. May
|
||||
// not be an absolute path. May not contain the path element
|
||||
// '..'. May not start with the string '..'.
|
||||
path: string
|
||||
}]
|
||||
|
||||
// Name of the referent. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name?: string
|
||||
|
||||
// optional specify whether the ConfigMap or its keys must be
|
||||
// defined
|
||||
optional?: bool
|
||||
}
|
||||
downwardAPI?: {
|
||||
// Items is a list of DownwardAPIVolume file
|
||||
items?: [...{
|
||||
// Required: Selects a field of the pod: only annotations, labels,
|
||||
// name and namespace are supported.
|
||||
fieldRef?: {
|
||||
// Version of the schema the FieldPath is written in terms of,
|
||||
// defaults to "v1".
|
||||
apiVersion?: string
|
||||
|
||||
// Path of the field to select in the specified API version.
|
||||
fieldPath: string
|
||||
}
|
||||
|
||||
// Optional: mode bits used to set permissions on this file, must
|
||||
// be an octal value between 0000 and 0777 or a decimal value
|
||||
// between 0 and 511. YAML accepts both octal and decimal values,
|
||||
// JSON requires decimal values for mode bits. If not specified,
|
||||
// the volume defaultMode will be used. This might be in conflict
|
||||
// with other options that affect the file mode, like fsGroup,
|
||||
// and the result can be other mode bits set.
|
||||
mode?: int
|
||||
|
||||
// Required: Path is the relative path name of the file to be
|
||||
// created. Must not be absolute or contain the '..' path. Must
|
||||
// be utf-8 encoded. The first item of the relative path must not
|
||||
// start with '..'
|
||||
path: string
|
||||
|
||||
// Selects a resource of the container: only resources limits and
|
||||
// requests (limits.cpu, limits.memory, requests.cpu and
|
||||
// requests.memory) are currently supported.
|
||||
resourceFieldRef?: {
|
||||
// Container name: required for volumes, optional for env vars
|
||||
containerName?: string
|
||||
|
||||
// Specifies the output format of the exposed resources, defaults
|
||||
// to "1"
|
||||
divisor?: (int | string) & {
|
||||
=~"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
|
||||
}
|
||||
|
||||
// Required: resource to select
|
||||
resource: string
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
// secret information about the secret data to project
|
||||
secret?: {
|
||||
// items if unspecified, each key-value pair in the Data field of
|
||||
// the referenced Secret will be projected into the volume as a
|
||||
// file whose name is the key and content is the value. If
|
||||
// specified, the listed keys will be projected into the
|
||||
// specified paths, and unlisted keys will not be present. If a
|
||||
// key is specified which is not present in the Secret, the
|
||||
// volume setup will error unless it is marked optional. Paths
|
||||
// must be relative and may not contain the '..' path or start
|
||||
// with '..'.
|
||||
items?: [...{
|
||||
// key is the key to project.
|
||||
key: string
|
||||
|
||||
// mode is Optional: mode bits used to set permissions on this
|
||||
// file. Must be an octal value between 0000 and 0777 or a
|
||||
// decimal value between 0 and 511. YAML accepts both octal and
|
||||
// decimal values, JSON requires decimal values for mode bits. If
|
||||
// not specified, the volume defaultMode will be used. This might
|
||||
// be in conflict with other options that affect the file mode,
|
||||
// like fsGroup, and the result can be other mode bits set.
|
||||
mode?: int
|
||||
|
||||
// path is the relative path of the file to map the key to. May
|
||||
// not be an absolute path. May not contain the path element
|
||||
// '..'. May not start with the string '..'.
|
||||
path: string
|
||||
}]
|
||||
|
||||
// Name of the referent. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name?: string
|
||||
|
||||
// optional field specify whether the Secret or its key must be
|
||||
// defined
|
||||
optional?: bool
|
||||
}
|
||||
|
||||
// serviceAccountToken is information about the
|
||||
// serviceAccountToken data to project
|
||||
serviceAccountToken?: {
|
||||
// audience is the intended audience of the token. A recipient of
|
||||
// a token must identify itself with an identifier specified in
|
||||
// the audience of the token, and otherwise should reject the
|
||||
// token. The audience defaults to the identifier of the
|
||||
// apiserver.
|
||||
audience?: string
|
||||
|
||||
// expirationSeconds is the requested duration of validity of the
|
||||
// service account token. As the token approaches expiration, the
|
||||
// kubelet volume plugin will proactively rotate the service
|
||||
// account token. The kubelet will start trying to rotate the
|
||||
// token if the token is older than 80 percent of its time to
|
||||
// live or if the token is older than 24 hours.Defaults to 1 hour
|
||||
// and must be at least 10 minutes.
|
||||
expirationSeconds?: int
|
||||
|
||||
// path is the path relative to the mount point of the file to
|
||||
// project the token into.
|
||||
path: string
|
||||
}
|
||||
}]
|
||||
|
||||
// A Secret containing the value for the LDAP_BIND_PASSWORD
|
||||
// setting. More info:
|
||||
// https://www.pgadmin.org/docs/pgadmin4/latest/ldap.html
|
||||
ldapBindPassword?: {
|
||||
// The key of the secret to select from. Must be a valid secret
|
||||
// key.
|
||||
key: string
|
||||
|
||||
// Name of the referent. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name?: string
|
||||
|
||||
// Specify whether the Secret or its key must be defined
|
||||
optional?: bool
|
||||
}
|
||||
|
||||
// Settings for the pgAdmin server process. Keys should be
|
||||
// uppercase and values must be constants. More info:
|
||||
// https://www.pgadmin.org/docs/pgadmin4/latest/config_py.html
|
||||
settings?: {
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
// Defines a PersistentVolumeClaim for pgAdmin data. More info:
|
||||
// https://kubernetes.io/docs/concepts/storage/persistent-volumes
|
||||
dataVolumeClaimSpec: {
|
||||
// accessModes contains the desired access modes the volume should
|
||||
// have. More info:
|
||||
// https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
|
||||
accessModes?: [...string]
|
||||
|
||||
// dataSource field can be used to specify either: * An existing
|
||||
// VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
|
||||
// * An existing PVC (PersistentVolumeClaim) If the provisioner
|
||||
// or an external controller can support the specified data
|
||||
// source, it will create a new volume based on the contents of
|
||||
// the specified data source. If the AnyVolumeDataSource feature
|
||||
// gate is enabled, this field will always have the same contents
|
||||
// as the DataSourceRef field.
|
||||
dataSource?: {
|
||||
// APIGroup is the group for the resource being referenced. If
|
||||
// APIGroup is not specified, the specified Kind must be in the
|
||||
// core API group. For any other third-party types, APIGroup is
|
||||
// required.
|
||||
apiGroup?: string
|
||||
|
||||
// Kind is the type of resource being referenced
|
||||
kind: string
|
||||
|
||||
// Name is the name of resource being referenced
|
||||
name: string
|
||||
}
|
||||
|
||||
// dataSourceRef specifies the object from which to populate the
|
||||
// volume with data, if a non-empty volume is desired. This may
|
||||
// be any local object from a non-empty API group (non core
|
||||
// object) or a PersistentVolumeClaim object. When this field is
|
||||
// specified, volume binding will only succeed if the type of the
|
||||
// specified object matches some installed volume populator or
|
||||
// dynamic provisioner. This field will replace the functionality
|
||||
// of the DataSource field and as such if both fields are
|
||||
// non-empty, they must have the same value. For backwards
|
||||
// compatibility, both fields (DataSource and DataSourceRef) will
|
||||
// be set to the same value automatically if one of them is empty
|
||||
// and the other is non-empty. There are two important
|
||||
// differences between DataSource and DataSourceRef: * While
|
||||
// DataSource only allows two specific types of objects,
|
||||
// DataSourceRef allows any non-core object, as well as
|
||||
// PersistentVolumeClaim objects. * While DataSource ignores
|
||||
// disallowed values (dropping them), DataSourceRef preserves all
|
||||
// values, and generates an error if a disallowed value is
|
||||
// specified. (Beta) Using this field requires the
|
||||
// AnyVolumeDataSource feature gate to be enabled.
|
||||
dataSourceRef?: {
|
||||
// APIGroup is the group for the resource being referenced. If
|
||||
// APIGroup is not specified, the specified Kind must be in the
|
||||
// core API group. For any other third-party types, APIGroup is
|
||||
// required.
|
||||
apiGroup?: string
|
||||
|
||||
// Kind is the type of resource being referenced
|
||||
kind: string
|
||||
|
||||
// Name is the name of resource being referenced
|
||||
name: string
|
||||
}
|
||||
|
||||
// resources represents the minimum resources the volume should
|
||||
// have. If RecoverVolumeExpansionFailure feature is enabled
|
||||
// users are allowed to specify resource requirements that are
|
||||
// lower than previous value but must still be higher than
|
||||
// capacity recorded in the status field of the claim. More info:
|
||||
// https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
|
||||
resources?: {
|
||||
// Limits describes the maximum amount of compute resources
|
||||
// allowed. More info:
|
||||
// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
limits?: {
|
||||
[string]: (int | string) & =~"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
|
||||
}
|
||||
|
||||
// Requests describes the minimum amount of compute resources
|
||||
// required. If Requests is omitted for a container, it defaults
|
||||
// to Limits if that is explicitly specified, otherwise to an
|
||||
// implementation-defined value. More info:
|
||||
// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
requests?: {
|
||||
[string]: (int | string) & =~"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
|
||||
}
|
||||
}
|
||||
|
||||
// selector is a label query over volumes to consider for binding.
|
||||
selector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// storageClassName is the name of the StorageClass required by
|
||||
// the claim. More info:
|
||||
// https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
|
||||
storageClassName?: string
|
||||
|
||||
// volumeMode defines what type of volume is required by the
|
||||
// claim. Value of Filesystem is implied when not included in
|
||||
// claim spec.
|
||||
volumeMode?: string
|
||||
|
||||
// volumeName is the binding reference to the PersistentVolume
|
||||
// backing this claim.
|
||||
volumeName?: string
|
||||
}
|
||||
|
||||
// The image name to use for pgAdmin instance.
|
||||
image?: string
|
||||
|
||||
// ImagePullPolicy is used to determine when Kubernetes will
|
||||
// attempt to pull (download) container images. More info:
|
||||
// https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
|
||||
imagePullPolicy?: "Always" | "Never" | "IfNotPresent"
|
||||
|
||||
// The image pull secrets used to pull from a private registry.
|
||||
// Changing this value causes all running PGAdmin pods to
|
||||
// restart.
|
||||
// https://k8s.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
imagePullSecrets?: [...{
|
||||
// Name of the referent. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name?: string
|
||||
}]
|
||||
|
||||
// Metadata contains metadata for custom resources
|
||||
metadata?: {
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Priority class name for the PGAdmin pod. Changing this value
|
||||
// causes PGAdmin pod to restart. More info:
|
||||
// https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
|
||||
priorityClassName?: string
|
||||
|
||||
// Resource requirements for the PGAdmin container.
|
||||
resources?: {
|
||||
// Limits describes the maximum amount of compute resources
|
||||
// allowed. More info:
|
||||
// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
limits?: {
|
||||
[string]: (int | string) & =~"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
|
||||
}
|
||||
|
||||
// Requests describes the minimum amount of compute resources
|
||||
// required. If Requests is omitted for a container, it defaults
|
||||
// to Limits if that is explicitly specified, otherwise to an
|
||||
// implementation-defined value. More info:
|
||||
// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
requests?: {
|
||||
[string]: (int | string) & =~"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
|
||||
}
|
||||
}
|
||||
|
||||
// ServerGroups for importing PostgresClusters to pgAdmin. To
|
||||
// create a pgAdmin with no selectors, leave this field empty. A
|
||||
// pgAdmin created with no `ServerGroups` will not automatically
|
||||
// add any servers through discovery. PostgresClusters can still
|
||||
// be added manually.
|
||||
serverGroups?: [...{
|
||||
// The name for the ServerGroup in pgAdmin. Must be unique in the
|
||||
// pgAdmin's ServerGroups since it becomes the ServerGroup name
|
||||
// in pgAdmin.
|
||||
name: string
|
||||
|
||||
// PostgresClusterSelector selects clusters to dynamically add to
|
||||
// pgAdmin by matching labels. An empty selector like `{}` will
|
||||
// select ALL clusters in the namespace.
|
||||
postgresClusterSelector: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}]
|
||||
|
||||
// Tolerations of the PGAdmin pod. More info:
|
||||
// https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
|
||||
tolerations?: [...{
|
||||
// Effect indicates the taint effect to match. Empty means match
|
||||
// all taint effects. When specified, allowed values are
|
||||
// NoSchedule, PreferNoSchedule and NoExecute.
|
||||
effect?: string
|
||||
|
||||
// Key is the taint key that the toleration applies to. Empty
|
||||
// means match all taint keys. If the key is empty, operator must
|
||||
// be Exists; this combination means to match all values and all
|
||||
// keys.
|
||||
key?: string
|
||||
|
||||
// Operator represents a key's relationship to the value. Valid
|
||||
// operators are Exists and Equal. Defaults to Equal. Exists is
|
||||
// equivalent to wildcard for value, so that a pod can tolerate
|
||||
// all taints of a particular category.
|
||||
operator?: string
|
||||
|
||||
// TolerationSeconds represents the period of time the toleration
|
||||
// (which must be of effect NoExecute, otherwise this field is
|
||||
// ignored) tolerates the taint. By default, it is not set, which
|
||||
// means tolerate the taint forever (do not evict). Zero and
|
||||
// negative values will be treated as 0 (evict immediately) by
|
||||
// the system.
|
||||
tolerationSeconds?: int
|
||||
|
||||
// Value is the taint value the toleration matches to. If the
|
||||
// operator is Exists, the value should be empty, otherwise just
|
||||
// a regular string.
|
||||
value?: string
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,632 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/core2/components/prod-pgo-crds/prod-pgo-crds.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
// PGUpgrade is the Schema for the pgupgrades API
|
||||
#PGUpgrade: {
|
||||
// APIVersion defines the versioned schema of this representation
|
||||
// of an object. Servers should convert recognized schemas to the
|
||||
// latest internal value, and may reject unrecognized values.
|
||||
// More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
apiVersion: "postgres-operator.crunchydata.com/v1beta1"
|
||||
|
||||
// Kind is a string value representing the REST resource this
|
||||
// object represents. Servers may infer this from the endpoint
|
||||
// the client submits requests to. Cannot be updated. In
|
||||
// CamelCase. More info:
|
||||
// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
kind: "PGUpgrade"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// PGUpgradeSpec defines the desired state of PGUpgrade
|
||||
spec!: #PGUpgradeSpec
|
||||
}
|
||||
|
||||
// PGUpgradeSpec defines the desired state of PGUpgrade
|
||||
#PGUpgradeSpec: {
|
||||
// Scheduling constraints of the PGUpgrade pod. More info:
|
||||
// https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node
|
||||
affinity?: {
|
||||
// Describes node affinity scheduling rules for the pod.
|
||||
nodeAffinity?: {
|
||||
// The scheduler will prefer to schedule pods to nodes that
|
||||
// satisfy the affinity expressions specified by this field, but
|
||||
// it may choose a node that violates one or more of the
|
||||
// expressions. The node that is most preferred is the one with
|
||||
// the greatest sum of weights, i.e. for each node that meets all
|
||||
// of the scheduling requirements (resource request,
|
||||
// requiredDuringScheduling affinity expressions, etc.), compute
|
||||
// a sum by iterating through the elements of this field and
|
||||
// adding "weight" to the sum if the node matches the
|
||||
// corresponding matchExpressions; the node(s) with the highest
|
||||
// sum are the most preferred.
|
||||
preferredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// A node selector term, associated with the corresponding weight.
|
||||
preference: {
|
||||
// A list of node selector requirements by node's labels.
|
||||
matchExpressions?: [...{
|
||||
// The label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// Represents a key's relationship to a set of values. Valid
|
||||
// operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
|
||||
operator: string
|
||||
|
||||
// An array of string values. If the operator is In or NotIn, the
|
||||
// values array must be non-empty. If the operator is Exists or
|
||||
// DoesNotExist, the values array must be empty. If the operator
|
||||
// is Gt or Lt, the values array must have a single element,
|
||||
// which will be interpreted as an integer. This array is
|
||||
// replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// A list of node selector requirements by node's fields.
|
||||
matchFields?: [...{
|
||||
// The label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// Represents a key's relationship to a set of values. Valid
|
||||
// operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
|
||||
operator: string
|
||||
|
||||
// An array of string values. If the operator is In or NotIn, the
|
||||
// values array must be non-empty. If the operator is Exists or
|
||||
// DoesNotExist, the values array must be empty. If the operator
|
||||
// is Gt or Lt, the values array must have a single element,
|
||||
// which will be interpreted as an integer. This array is
|
||||
// replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
}
|
||||
|
||||
// Weight associated with matching the corresponding
|
||||
// nodeSelectorTerm, in the range 1-100.
|
||||
weight: int
|
||||
}]
|
||||
requiredDuringSchedulingIgnoredDuringExecution?: {
|
||||
// Required. A list of node selector terms. The terms are ORed.
|
||||
nodeSelectorTerms: [...{
|
||||
// A list of node selector requirements by node's labels.
|
||||
matchExpressions?: [...{
|
||||
// The label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// Represents a key's relationship to a set of values. Valid
|
||||
// operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
|
||||
operator: string
|
||||
|
||||
// An array of string values. If the operator is In or NotIn, the
|
||||
// values array must be non-empty. If the operator is Exists or
|
||||
// DoesNotExist, the values array must be empty. If the operator
|
||||
// is Gt or Lt, the values array must have a single element,
|
||||
// which will be interpreted as an integer. This array is
|
||||
// replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// A list of node selector requirements by node's fields.
|
||||
matchFields?: [...{
|
||||
// The label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// Represents a key's relationship to a set of values. Valid
|
||||
// operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
|
||||
operator: string
|
||||
|
||||
// An array of string values. If the operator is In or NotIn, the
|
||||
// values array must be non-empty. If the operator is Exists or
|
||||
// DoesNotExist, the values array must be empty. If the operator
|
||||
// is Gt or Lt, the values array must have a single element,
|
||||
// which will be interpreted as an integer. This array is
|
||||
// replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
// Describes pod affinity scheduling rules (e.g. co-locate this
|
||||
// pod in the same node, zone, etc. as some other pod(s)).
|
||||
podAffinity?: {
|
||||
// The scheduler will prefer to schedule pods to nodes that
|
||||
// satisfy the affinity expressions specified by this field, but
|
||||
// it may choose a node that violates one or more of the
|
||||
// expressions. The node that is most preferred is the one with
|
||||
// the greatest sum of weights, i.e. for each node that meets all
|
||||
// of the scheduling requirements (resource request,
|
||||
// requiredDuringScheduling affinity expressions, etc.), compute
|
||||
// a sum by iterating through the elements of this field and
|
||||
// adding "weight" to the sum if the node has pods which matches
|
||||
// the corresponding podAffinityTerm; the node(s) with the
|
||||
// highest sum are the most preferred.
|
||||
preferredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// Required. A pod affinity term, associated with the
|
||||
// corresponding weight.
|
||||
podAffinityTerm: {
|
||||
// A label query over a set of resources, in this case pods.
|
||||
labelSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// A label query over the set of namespaces that the term applies
|
||||
// to. The term is applied to the union of the namespaces
|
||||
// selected by this field and the ones listed in the namespaces
|
||||
// field. null selector and null or empty namespaces list means
|
||||
// "this pod's namespace". An empty selector ({}) matches all
|
||||
// namespaces.
|
||||
namespaceSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// namespaces specifies a static list of namespace names that the
|
||||
// term applies to. The term is applied to the union of the
|
||||
// namespaces listed in this field and the ones selected by
|
||||
// namespaceSelector. null or empty namespaces list and null
|
||||
// namespaceSelector means "this pod's namespace".
|
||||
namespaces?: [...string]
|
||||
|
||||
// This pod should be co-located (affinity) or not co-located
|
||||
// (anti-affinity) with the pods matching the labelSelector in
|
||||
// the specified namespaces, where co-located is defined as
|
||||
// running on a node whose value of the label with key
|
||||
// topologyKey matches that of any node on which any of the
|
||||
// selected pods is running. Empty topologyKey is not allowed.
|
||||
topologyKey: string
|
||||
}
|
||||
|
||||
// weight associated with matching the corresponding
|
||||
// podAffinityTerm, in the range 1-100.
|
||||
weight: int
|
||||
}]
|
||||
|
||||
// If the affinity requirements specified by this field are not
|
||||
// met at scheduling time, the pod will not be scheduled onto the
|
||||
// node. If the affinity requirements specified by this field
|
||||
// cease to be met at some point during pod execution (e.g. due
|
||||
// to a pod label update), the system may or may not try to
|
||||
// eventually evict the pod from its node. When there are
|
||||
// multiple elements, the lists of nodes corresponding to each
|
||||
// podAffinityTerm are intersected, i.e. all terms must be
|
||||
// satisfied.
|
||||
requiredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// A label query over a set of resources, in this case pods.
|
||||
labelSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// A label query over the set of namespaces that the term applies
|
||||
// to. The term is applied to the union of the namespaces
|
||||
// selected by this field and the ones listed in the namespaces
|
||||
// field. null selector and null or empty namespaces list means
|
||||
// "this pod's namespace". An empty selector ({}) matches all
|
||||
// namespaces.
|
||||
namespaceSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// namespaces specifies a static list of namespace names that the
|
||||
// term applies to. The term is applied to the union of the
|
||||
// namespaces listed in this field and the ones selected by
|
||||
// namespaceSelector. null or empty namespaces list and null
|
||||
// namespaceSelector means "this pod's namespace".
|
||||
namespaces?: [...string]
|
||||
|
||||
// This pod should be co-located (affinity) or not co-located
|
||||
// (anti-affinity) with the pods matching the labelSelector in
|
||||
// the specified namespaces, where co-located is defined as
|
||||
// running on a node whose value of the label with key
|
||||
// topologyKey matches that of any node on which any of the
|
||||
// selected pods is running. Empty topologyKey is not allowed.
|
||||
topologyKey: string
|
||||
}]
|
||||
}
|
||||
|
||||
// Describes pod anti-affinity scheduling rules (e.g. avoid
|
||||
// putting this pod in the same node, zone, etc. as some other
|
||||
// pod(s)).
|
||||
podAntiAffinity?: {
|
||||
// The scheduler will prefer to schedule pods to nodes that
|
||||
// satisfy the anti-affinity expressions specified by this field,
|
||||
// but it may choose a node that violates one or more of the
|
||||
// expressions. The node that is most preferred is the one with
|
||||
// the greatest sum of weights, i.e. for each node that meets all
|
||||
// of the scheduling requirements (resource request,
|
||||
// requiredDuringScheduling anti-affinity expressions, etc.),
|
||||
// compute a sum by iterating through the elements of this field
|
||||
// and adding "weight" to the sum if the node has pods which
|
||||
// matches the corresponding podAffinityTerm; the node(s) with
|
||||
// the highest sum are the most preferred.
|
||||
preferredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// Required. A pod affinity term, associated with the
|
||||
// corresponding weight.
|
||||
podAffinityTerm: {
|
||||
// A label query over a set of resources, in this case pods.
|
||||
labelSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// A label query over the set of namespaces that the term applies
|
||||
// to. The term is applied to the union of the namespaces
|
||||
// selected by this field and the ones listed in the namespaces
|
||||
// field. null selector and null or empty namespaces list means
|
||||
// "this pod's namespace". An empty selector ({}) matches all
|
||||
// namespaces.
|
||||
namespaceSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// namespaces specifies a static list of namespace names that the
|
||||
// term applies to. The term is applied to the union of the
|
||||
// namespaces listed in this field and the ones selected by
|
||||
// namespaceSelector. null or empty namespaces list and null
|
||||
// namespaceSelector means "this pod's namespace".
|
||||
namespaces?: [...string]
|
||||
|
||||
// This pod should be co-located (affinity) or not co-located
|
||||
// (anti-affinity) with the pods matching the labelSelector in
|
||||
// the specified namespaces, where co-located is defined as
|
||||
// running on a node whose value of the label with key
|
||||
// topologyKey matches that of any node on which any of the
|
||||
// selected pods is running. Empty topologyKey is not allowed.
|
||||
topologyKey: string
|
||||
}
|
||||
|
||||
// weight associated with matching the corresponding
|
||||
// podAffinityTerm, in the range 1-100.
|
||||
weight: int
|
||||
}]
|
||||
|
||||
// If the anti-affinity requirements specified by this field are
|
||||
// not met at scheduling time, the pod will not be scheduled onto
|
||||
// the node. If the anti-affinity requirements specified by this
|
||||
// field cease to be met at some point during pod execution (e.g.
|
||||
// due to a pod label update), the system may or may not try to
|
||||
// eventually evict the pod from its node. When there are
|
||||
// multiple elements, the lists of nodes corresponding to each
|
||||
// podAffinityTerm are intersected, i.e. all terms must be
|
||||
// satisfied.
|
||||
requiredDuringSchedulingIgnoredDuringExecution?: [...{
|
||||
// A label query over a set of resources, in this case pods.
|
||||
labelSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// A label query over the set of namespaces that the term applies
|
||||
// to. The term is applied to the union of the namespaces
|
||||
// selected by this field and the ones listed in the namespaces
|
||||
// field. null selector and null or empty namespaces list means
|
||||
// "this pod's namespace". An empty selector ({}) matches all
|
||||
// namespaces.
|
||||
namespaceSelector?: {
|
||||
// matchExpressions is a list of label selector requirements. The
|
||||
// requirements are ANDed.
|
||||
matchExpressions?: [...{
|
||||
// key is the label key that the selector applies to.
|
||||
key: string
|
||||
|
||||
// operator represents a key's relationship to a set of values.
|
||||
// Valid operators are In, NotIn, Exists and DoesNotExist.
|
||||
operator: string
|
||||
|
||||
// values is an array of string values. If the operator is In or
|
||||
// NotIn, the values array must be non-empty. If the operator is
|
||||
// Exists or DoesNotExist, the values array must be empty. This
|
||||
// array is replaced during a strategic merge patch.
|
||||
values?: [...string]
|
||||
}]
|
||||
|
||||
// matchLabels is a map of {key,value} pairs. A single {key,value}
|
||||
// in the matchLabels map is equivalent to an element of
|
||||
// matchExpressions, whose key field is "key", the operator is
|
||||
// "In", and the values array contains only "value". The
|
||||
// requirements are ANDed.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// namespaces specifies a static list of namespace names that the
|
||||
// term applies to. The term is applied to the union of the
|
||||
// namespaces listed in this field and the ones selected by
|
||||
// namespaceSelector. null or empty namespaces list and null
|
||||
// namespaceSelector means "this pod's namespace".
|
||||
namespaces?: [...string]
|
||||
|
||||
// This pod should be co-located (affinity) or not co-located
|
||||
// (anti-affinity) with the pods matching the labelSelector in
|
||||
// the specified namespaces, where co-located is defined as
|
||||
// running on a node whose value of the label with key
|
||||
// topologyKey matches that of any node on which any of the
|
||||
// selected pods is running. Empty topologyKey is not allowed.
|
||||
topologyKey: string
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
// The major version of PostgreSQL before the upgrade.
|
||||
fromPostgresVersion: uint & >=10 & <=16
|
||||
|
||||
// The image name to use for major PostgreSQL upgrades.
|
||||
image?: string
|
||||
|
||||
// ImagePullPolicy is used to determine when Kubernetes will
|
||||
// attempt to pull (download) container images. More info:
|
||||
// https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
|
||||
imagePullPolicy?: "Always" | "Never" | "IfNotPresent"
|
||||
|
||||
// The image pull secrets used to pull from a private registry.
|
||||
// Changing this value causes all running PGUpgrade pods to
|
||||
// restart.
|
||||
// https://k8s.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
imagePullSecrets?: [...{
|
||||
// Name of the referent. More info:
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
name?: string
|
||||
}]
|
||||
|
||||
// Metadata contains metadata for custom resources
|
||||
metadata?: {
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// The name of the cluster to be updated
|
||||
postgresClusterName: strings.MinRunes(1)
|
||||
|
||||
// Priority class name for the PGUpgrade pod. Changing this value
|
||||
// causes PGUpgrade pod to restart. More info:
|
||||
// https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
|
||||
priorityClassName?: string
|
||||
|
||||
// Resource requirements for the PGUpgrade container.
|
||||
resources?: {
|
||||
// Limits describes the maximum amount of compute resources
|
||||
// allowed. More info:
|
||||
// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
limits?: {
|
||||
[string]: (int | string) & =~"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
|
||||
}
|
||||
|
||||
// Requests describes the minimum amount of compute resources
|
||||
// required. If Requests is omitted for a container, it defaults
|
||||
// to Limits if that is explicitly specified, otherwise to an
|
||||
// implementation-defined value. More info:
|
||||
// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
|
||||
requests?: {
|
||||
[string]: (int | string) & =~"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$"
|
||||
}
|
||||
}
|
||||
|
||||
// The image name to use for PostgreSQL containers after upgrade.
|
||||
// When omitted, the value comes from an operator environment
|
||||
// variable.
|
||||
toPostgresImage?: string
|
||||
|
||||
// The major version of PostgreSQL to be upgraded to.
|
||||
toPostgresVersion: uint & >=10 & <=16
|
||||
|
||||
// Tolerations of the PGUpgrade pod. More info:
|
||||
// https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
|
||||
tolerations?: [...{
|
||||
// Effect indicates the taint effect to match. Empty means match
|
||||
// all taint effects. When specified, allowed values are
|
||||
// NoSchedule, PreferNoSchedule and NoExecute.
|
||||
effect?: string
|
||||
|
||||
// Key is the taint key that the toleration applies to. Empty
|
||||
// means match all taint keys. If the key is empty, operator must
|
||||
// be Exists; this combination means to match all values and all
|
||||
// keys.
|
||||
key?: string
|
||||
|
||||
// Operator represents a key's relationship to the value. Valid
|
||||
// operators are Exists and Equal. Defaults to Equal. Exists is
|
||||
// equivalent to wildcard for value, so that a pod can tolerate
|
||||
// all taints of a particular category.
|
||||
operator?: string
|
||||
|
||||
// TolerationSeconds represents the period of time the toleration
|
||||
// (which must be of effect NoExecute, otherwise this field is
|
||||
// ignored) tolerates the taint. By default, it is not set, which
|
||||
// means tolerate the taint forever (do not evict). Zero and
|
||||
// negative values will be treated as 0 (evict immediately) by
|
||||
// the system.
|
||||
tolerationSeconds?: int
|
||||
|
||||
// Value is the taint value the toleration matches to. If the
|
||||
// operator is Exists, the value should be empty, otherwise just
|
||||
// a regular string.
|
||||
value?: string
|
||||
}]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,147 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1
|
||||
|
||||
import "strings"
|
||||
|
||||
#AuthorizationPolicy: {
|
||||
// Configuration for access control on workloads. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/security/authorization-policy.html
|
||||
spec!: #AuthorizationPolicySpec
|
||||
apiVersion: "security.istio.io/v1"
|
||||
kind: "AuthorizationPolicy"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration for access control on workloads. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/security/authorization-policy.html
|
||||
#AuthorizationPolicySpec: ({} | {
|
||||
provider: _
|
||||
}) & {
|
||||
// Optional.
|
||||
action?: "ALLOW" | "DENY" | "AUDIT" | "CUSTOM"
|
||||
provider?: {
|
||||
// Specifies the name of the extension provider.
|
||||
name?: string
|
||||
}
|
||||
|
||||
// Optional.
|
||||
rules?: [...{
|
||||
// Optional.
|
||||
from?: [...{
|
||||
// Source specifies the source of a request.
|
||||
source?: {
|
||||
// Optional.
|
||||
ipBlocks?: [...string]
|
||||
|
||||
// Optional.
|
||||
namespaces?: [...string]
|
||||
|
||||
// Optional.
|
||||
notIpBlocks?: [...string]
|
||||
|
||||
// Optional.
|
||||
notNamespaces?: [...string]
|
||||
|
||||
// Optional.
|
||||
notPrincipals?: [...string]
|
||||
|
||||
// Optional.
|
||||
notRemoteIpBlocks?: [...string]
|
||||
|
||||
// Optional.
|
||||
notRequestPrincipals?: [...string]
|
||||
|
||||
// Optional.
|
||||
principals?: [...string]
|
||||
|
||||
// Optional.
|
||||
remoteIpBlocks?: [...string]
|
||||
|
||||
// Optional.
|
||||
requestPrincipals?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// Optional.
|
||||
to?: [...{
|
||||
// Operation specifies the operation of a request.
|
||||
operation?: {
|
||||
// Optional.
|
||||
hosts?: [...string]
|
||||
|
||||
// Optional.
|
||||
methods?: [...string]
|
||||
|
||||
// Optional.
|
||||
notHosts?: [...string]
|
||||
|
||||
// Optional.
|
||||
notMethods?: [...string]
|
||||
|
||||
// Optional.
|
||||
notPaths?: [...string]
|
||||
|
||||
// Optional.
|
||||
notPorts?: [...string]
|
||||
|
||||
// Optional.
|
||||
paths?: [...string]
|
||||
|
||||
// Optional.
|
||||
ports?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// Optional.
|
||||
when?: [...{
|
||||
// The name of an Istio attribute.
|
||||
key: string
|
||||
|
||||
// Optional.
|
||||
notValues?: [...string]
|
||||
|
||||
// Optional.
|
||||
values?: [...string]
|
||||
}]
|
||||
}]
|
||||
selector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which a policy should be applied.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Optional.
|
||||
targetRef?: {
|
||||
// group is the group of the target resource.
|
||||
group?: string
|
||||
|
||||
// kind is kind of the target resource.
|
||||
kind?: string
|
||||
|
||||
// name is the name of the target resource.
|
||||
name?: string
|
||||
|
||||
// namespace is the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#AuthorizationPolicy: {
|
||||
// Configuration for access control on workloads. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/security/authorization-policy.html
|
||||
spec!: #AuthorizationPolicySpec
|
||||
apiVersion: "security.istio.io/v1beta1"
|
||||
kind: "AuthorizationPolicy"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configuration for access control on workloads. See more details
|
||||
// at:
|
||||
// https://istio.io/docs/reference/config/security/authorization-policy.html
|
||||
#AuthorizationPolicySpec: ({} | {
|
||||
provider: _
|
||||
}) & {
|
||||
// Optional.
|
||||
action?: "ALLOW" | "DENY" | "AUDIT" | "CUSTOM"
|
||||
provider?: {
|
||||
// Specifies the name of the extension provider.
|
||||
name?: string
|
||||
}
|
||||
|
||||
// Optional.
|
||||
rules?: [...{
|
||||
// Optional.
|
||||
from?: [...{
|
||||
// Source specifies the source of a request.
|
||||
source?: {
|
||||
// Optional.
|
||||
ipBlocks?: [...string]
|
||||
|
||||
// Optional.
|
||||
namespaces?: [...string]
|
||||
|
||||
// Optional.
|
||||
notIpBlocks?: [...string]
|
||||
|
||||
// Optional.
|
||||
notNamespaces?: [...string]
|
||||
|
||||
// Optional.
|
||||
notPrincipals?: [...string]
|
||||
|
||||
// Optional.
|
||||
notRemoteIpBlocks?: [...string]
|
||||
|
||||
// Optional.
|
||||
notRequestPrincipals?: [...string]
|
||||
|
||||
// Optional.
|
||||
principals?: [...string]
|
||||
|
||||
// Optional.
|
||||
remoteIpBlocks?: [...string]
|
||||
|
||||
// Optional.
|
||||
requestPrincipals?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// Optional.
|
||||
to?: [...{
|
||||
// Operation specifies the operation of a request.
|
||||
operation?: {
|
||||
// Optional.
|
||||
hosts?: [...string]
|
||||
|
||||
// Optional.
|
||||
methods?: [...string]
|
||||
|
||||
// Optional.
|
||||
notHosts?: [...string]
|
||||
|
||||
// Optional.
|
||||
notMethods?: [...string]
|
||||
|
||||
// Optional.
|
||||
notPaths?: [...string]
|
||||
|
||||
// Optional.
|
||||
notPorts?: [...string]
|
||||
|
||||
// Optional.
|
||||
paths?: [...string]
|
||||
|
||||
// Optional.
|
||||
ports?: [...string]
|
||||
}
|
||||
}]
|
||||
|
||||
// Optional.
|
||||
when?: [...{
|
||||
// The name of an Istio attribute.
|
||||
key: string
|
||||
|
||||
// Optional.
|
||||
notValues?: [...string]
|
||||
|
||||
// Optional.
|
||||
values?: [...string]
|
||||
}]
|
||||
}]
|
||||
selector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which a policy should be applied.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Optional.
|
||||
targetRef?: {
|
||||
// group is the group of the target resource.
|
||||
group?: string
|
||||
|
||||
// kind is kind of the target resource.
|
||||
kind?: string
|
||||
|
||||
// name is the name of the target resource.
|
||||
name?: string
|
||||
|
||||
// namespace is the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#PeerAuthentication: {
|
||||
// Peer authentication configuration for workloads. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/security/peer_authentication.html
|
||||
spec!: #PeerAuthenticationSpec
|
||||
apiVersion: "security.istio.io/v1beta1"
|
||||
kind: "PeerAuthentication"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Peer authentication configuration for workloads. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/security/peer_authentication.html
|
||||
#PeerAuthenticationSpec: {
|
||||
mtls?: {
|
||||
// Defines the mTLS mode used for peer authentication.
|
||||
mode?: "UNSET" | "DISABLE" | "PERMISSIVE" | "STRICT"
|
||||
}
|
||||
|
||||
// Port specific mutual TLS settings.
|
||||
portLevelMtls?: {
|
||||
[string]: {
|
||||
// Defines the mTLS mode used for peer authentication.
|
||||
mode?: "UNSET" | "DISABLE" | "PERMISSIVE" | "STRICT"
|
||||
}
|
||||
}
|
||||
selector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which a policy should be applied.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1
|
||||
|
||||
import "strings"
|
||||
|
||||
#RequestAuthentication: {
|
||||
// Request authentication configuration for workloads. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/security/request_authentication.html
|
||||
spec!: #RequestAuthenticationSpec
|
||||
apiVersion: "security.istio.io/v1"
|
||||
kind: "RequestAuthentication"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Request authentication configuration for workloads. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/security/request_authentication.html
|
||||
#RequestAuthenticationSpec: {
|
||||
// Define the list of JWTs that can be validated at the selected
|
||||
// workloads' proxy.
|
||||
jwtRules?: [...{
|
||||
// The list of JWT
|
||||
// [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3)
|
||||
// that are allowed to access.
|
||||
audiences?: [...string]
|
||||
|
||||
// If set to true, the original token will be kept for the
|
||||
// upstream request.
|
||||
forwardOriginalToken?: bool
|
||||
|
||||
// List of header locations from which JWT is expected.
|
||||
fromHeaders?: [...{
|
||||
// The HTTP header name.
|
||||
name: string
|
||||
|
||||
// The prefix that should be stripped before decoding the token.
|
||||
prefix?: string
|
||||
}]
|
||||
|
||||
// List of query parameters from which JWT is expected.
|
||||
fromParams?: [...string]
|
||||
|
||||
// Identifies the issuer that issued the JWT.
|
||||
issuer: string
|
||||
|
||||
// JSON Web Key Set of public keys to validate signature of the
|
||||
// JWT.
|
||||
jwks?: string
|
||||
|
||||
// URL of the provider's public key set to validate signature of
|
||||
// the JWT.
|
||||
jwks_uri?: string
|
||||
|
||||
// URL of the provider's public key set to validate signature of
|
||||
// the JWT.
|
||||
jwksUri?: string
|
||||
|
||||
// This field specifies a list of operations to copy the claim to
|
||||
// HTTP headers on a successfully verified token.
|
||||
outputClaimToHeaders?: [...{
|
||||
// The name of the claim to be copied from.
|
||||
claim?: string
|
||||
|
||||
// The name of the header to be created.
|
||||
header?: string
|
||||
}]
|
||||
|
||||
// This field specifies the header name to output a successfully
|
||||
// verified JWT payload to the backend.
|
||||
outputPayloadToHeader?: string
|
||||
}]
|
||||
selector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which a policy should be applied.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Optional.
|
||||
targetRef?: {
|
||||
// group is the group of the target resource.
|
||||
group?: string
|
||||
|
||||
// kind is kind of the target resource.
|
||||
kind?: string
|
||||
|
||||
// name is the name of the target resource.
|
||||
name?: string
|
||||
|
||||
// namespace is the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f /home/jeff/workspace/holos-run/holos-infra/deploy/clusters/k2/components/prod-mesh-istio-base/prod-mesh-istio-base.gen.yaml
|
||||
|
||||
package v1beta1
|
||||
|
||||
import "strings"
|
||||
|
||||
#RequestAuthentication: {
|
||||
// Request authentication configuration for workloads. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/security/request_authentication.html
|
||||
spec!: #RequestAuthenticationSpec
|
||||
apiVersion: "security.istio.io/v1beta1"
|
||||
kind: "RequestAuthentication"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Request authentication configuration for workloads. See more
|
||||
// details at:
|
||||
// https://istio.io/docs/reference/config/security/request_authentication.html
|
||||
#RequestAuthenticationSpec: {
|
||||
// Define the list of JWTs that can be validated at the selected
|
||||
// workloads' proxy.
|
||||
jwtRules?: [...{
|
||||
// The list of JWT
|
||||
// [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3)
|
||||
// that are allowed to access.
|
||||
audiences?: [...string]
|
||||
|
||||
// If set to true, the original token will be kept for the
|
||||
// upstream request.
|
||||
forwardOriginalToken?: bool
|
||||
|
||||
// List of header locations from which JWT is expected.
|
||||
fromHeaders?: [...{
|
||||
// The HTTP header name.
|
||||
name: string
|
||||
|
||||
// The prefix that should be stripped before decoding the token.
|
||||
prefix?: string
|
||||
}]
|
||||
|
||||
// List of query parameters from which JWT is expected.
|
||||
fromParams?: [...string]
|
||||
|
||||
// Identifies the issuer that issued the JWT.
|
||||
issuer: string
|
||||
|
||||
// JSON Web Key Set of public keys to validate signature of the
|
||||
// JWT.
|
||||
jwks?: string
|
||||
|
||||
// URL of the provider's public key set to validate signature of
|
||||
// the JWT.
|
||||
jwks_uri?: string
|
||||
|
||||
// URL of the provider's public key set to validate signature of
|
||||
// the JWT.
|
||||
jwksUri?: string
|
||||
|
||||
// This field specifies a list of operations to copy the claim to
|
||||
// HTTP headers on a successfully verified token.
|
||||
outputClaimToHeaders?: [...{
|
||||
// The name of the claim to be copied from.
|
||||
claim?: string
|
||||
|
||||
// The name of the header to be created.
|
||||
header?: string
|
||||
}]
|
||||
|
||||
// This field specifies the header name to output a successfully
|
||||
// verified JWT payload to the backend.
|
||||
outputPayloadToHeader?: string
|
||||
}]
|
||||
selector?: {
|
||||
// One or more labels that indicate a specific set of pods/VMs on
|
||||
// which a policy should be applied.
|
||||
matchLabels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Optional.
|
||||
targetRef?: {
|
||||
// group is the group of the target resource.
|
||||
group?: string
|
||||
|
||||
// kind is kind of the target resource.
|
||||
kind?: string
|
||||
|
||||
// name is the name of the target resource.
|
||||
name?: string
|
||||
|
||||
// namespace is the namespace of the referent.
|
||||
namespace?: string
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
_#_BuiltinPluginLoadingOptions_name: "BploUndefinedBploUseStaticallyLinkedBploLoadFromFileSys"
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// ConfigMapArgs contains the metadata of how to generate a configmap.
|
||||
#ConfigMapArgs: {
|
||||
#GeneratorArgs
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
// Package types holds the definition of the kustomization struct and
|
||||
// supporting structs. It's the k8s API conformant object that describes
|
||||
// a set of generation and transformation operations to create and/or
|
||||
// modify k8s resources.
|
||||
// A kustomization file is a serialization of this struct.
|
||||
package types
|
||||
@@ -0,0 +1,29 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// FieldSpec completely specifies a kustomizable field in a k8s API object.
|
||||
// It helps define the operands of transformations.
|
||||
//
|
||||
// For example, a directive to add a common label to objects
|
||||
// will need to know that a 'Deployment' object (in API group
|
||||
// 'apps', any version) can have labels at field path
|
||||
// 'spec/template/metadata/labels', and further that it is OK
|
||||
// (or not OK) to add that field path to the object if the
|
||||
// field path doesn't exist already.
|
||||
//
|
||||
// This would look like
|
||||
// {
|
||||
// group: apps
|
||||
// kind: Deployment
|
||||
// path: spec/template/metadata/labels
|
||||
// create: true
|
||||
// }
|
||||
#FieldSpec: {
|
||||
path?: string @go(Path)
|
||||
create?: bool @go(CreateIfNotPresent)
|
||||
}
|
||||
|
||||
#FsSlice: [...#FieldSpec]
|
||||
@@ -0,0 +1,33 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// GenerationBehavior specifies generation behavior of configmaps, secrets and maybe other resources.
|
||||
#GenerationBehavior: int // #enumGenerationBehavior
|
||||
|
||||
#enumGenerationBehavior:
|
||||
#BehaviorUnspecified |
|
||||
#BehaviorCreate |
|
||||
#BehaviorReplace |
|
||||
#BehaviorMerge
|
||||
|
||||
#values_GenerationBehavior: {
|
||||
BehaviorUnspecified: #BehaviorUnspecified
|
||||
BehaviorCreate: #BehaviorCreate
|
||||
BehaviorReplace: #BehaviorReplace
|
||||
BehaviorMerge: #BehaviorMerge
|
||||
}
|
||||
|
||||
// BehaviorUnspecified is an Unspecified behavior; typically treated as a Create.
|
||||
#BehaviorUnspecified: #GenerationBehavior & 0
|
||||
|
||||
// BehaviorCreate makes a new resource.
|
||||
#BehaviorCreate: #GenerationBehavior & 1
|
||||
|
||||
// BehaviorReplace replaces a resource.
|
||||
#BehaviorReplace: #GenerationBehavior & 2
|
||||
|
||||
// BehaviorMerge attempts to merge a new resource with an existing resource.
|
||||
#BehaviorMerge: #GenerationBehavior & 3
|
||||
@@ -0,0 +1,27 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// GeneratorArgs contains arguments common to ConfigMap and Secret generators.
|
||||
#GeneratorArgs: {
|
||||
// Namespace for the resource, optional
|
||||
namespace?: string @go(Namespace)
|
||||
|
||||
// Name - actually the partial name - of the generated resource.
|
||||
// The full name ends up being something like
|
||||
// NamePrefix + this.Name + hash(content of generated resource).
|
||||
name?: string @go(Name)
|
||||
|
||||
// Behavior of generated resource, must be one of:
|
||||
// 'create': create a new one
|
||||
// 'replace': replace the existing one
|
||||
// 'merge': merge with the existing one
|
||||
behavior?: string @go(Behavior)
|
||||
|
||||
#KvPairSources
|
||||
|
||||
// Local overrides to global generatorOptions field.
|
||||
options?: null | #GeneratorOptions @go(Options,*GeneratorOptions)
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// GeneratorOptions modify behavior of all ConfigMap and Secret generators.
|
||||
#GeneratorOptions: {
|
||||
// Labels to add to all generated resources.
|
||||
labels?: {[string]: string} @go(Labels,map[string]string)
|
||||
|
||||
// Annotations to add to all generated resources.
|
||||
annotations?: {[string]: string} @go(Annotations,map[string]string)
|
||||
|
||||
// DisableNameSuffixHash if true disables the default behavior of adding a
|
||||
// suffix to the names of generated resources that is a hash of the
|
||||
// resource contents.
|
||||
disableNameSuffixHash?: bool @go(DisableNameSuffixHash)
|
||||
|
||||
// Immutable if true add to all generated resources.
|
||||
immutable?: bool @go(Immutable)
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
#HelmDefaultHome: "charts"
|
||||
|
||||
#HelmGlobals: {
|
||||
// ChartHome is a file path, relative to the kustomization root,
|
||||
// to a directory containing a subdirectory for each chart to be
|
||||
// included in the kustomization.
|
||||
// The default value of this field is "charts".
|
||||
// So, for example, kustomize looks for the minecraft chart
|
||||
// at {kustomizationRoot}/{ChartHome}/minecraft.
|
||||
// If the chart is there at build time, kustomize will use it as found,
|
||||
// and not check version numbers or dates.
|
||||
// If the chart is not there, kustomize will attempt to pull it
|
||||
// using the version number specified in the kustomization file,
|
||||
// and put it there. To suppress the pull attempt, simply assure
|
||||
// that the chart is already there.
|
||||
chartHome?: string @go(ChartHome)
|
||||
|
||||
// ConfigHome defines a value that kustomize should pass to helm via
|
||||
// the HELM_CONFIG_HOME environment variable. kustomize doesn't attempt
|
||||
// to read or write this directory.
|
||||
// If omitted, {tmpDir}/helm is used, where {tmpDir} is some temporary
|
||||
// directory created by kustomize for the benefit of helm.
|
||||
// Likewise, kustomize sets
|
||||
// HELM_CACHE_HOME={ConfigHome}/.cache
|
||||
// HELM_DATA_HOME={ConfigHome}/.data
|
||||
// for the helm subprocess.
|
||||
configHome?: string @go(ConfigHome)
|
||||
}
|
||||
|
||||
#HelmChart: {
|
||||
// Name is the name of the chart, e.g. 'minecraft'.
|
||||
name?: string @go(Name)
|
||||
|
||||
// Version is the version of the chart, e.g. '3.1.3'
|
||||
version?: string @go(Version)
|
||||
|
||||
// Repo is a URL locating the chart on the internet.
|
||||
// This is the argument to helm's `--repo` flag, e.g.
|
||||
// `https://itzg.github.io/minecraft-server-charts`.
|
||||
repo?: string @go(Repo)
|
||||
|
||||
// ReleaseName replaces RELEASE-NAME in chart template output,
|
||||
// making a particular inflation of a chart unique with respect to
|
||||
// other inflations of the same chart in a cluster. It's the first
|
||||
// argument to the helm `install` and `template` commands, i.e.
|
||||
// helm install {RELEASE-NAME} {chartName}
|
||||
// helm template {RELEASE-NAME} {chartName}
|
||||
// If omitted, the flag --generate-name is passed to 'helm template'.
|
||||
releaseName?: string @go(ReleaseName)
|
||||
|
||||
// Namespace set the target namespace for a release. It is .Release.Namespace
|
||||
// in the helm template
|
||||
namespace?: string @go(Namespace)
|
||||
|
||||
// AdditionalValuesFiles are local file paths to values files to be used in
|
||||
// addition to either the default values file or the values specified in ValuesFile.
|
||||
additionalValuesFiles?: [...string] @go(AdditionalValuesFiles,[]string)
|
||||
|
||||
// ValuesFile is a local file path to a values file to use _instead of_
|
||||
// the default values that accompanied the chart.
|
||||
// The default values are in '{ChartHome}/{Name}/values.yaml'.
|
||||
valuesFile?: string @go(ValuesFile)
|
||||
|
||||
// ValuesInline holds value mappings specified directly,
|
||||
// rather than in a separate file.
|
||||
valuesInline?: {...} @go(ValuesInline,map[string]interface{})
|
||||
|
||||
// ValuesMerge specifies how to treat ValuesInline with respect to Values.
|
||||
// Legal values: 'merge', 'override', 'replace'.
|
||||
// Defaults to 'override'.
|
||||
valuesMerge?: string @go(ValuesMerge)
|
||||
|
||||
// IncludeCRDs specifies if Helm should also generate CustomResourceDefinitions.
|
||||
// Defaults to 'false'.
|
||||
includeCRDs?: bool @go(IncludeCRDs)
|
||||
|
||||
// SkipHooks sets the --no-hooks flag when calling helm template. This prevents
|
||||
// helm from erroneously rendering test templates.
|
||||
skipHooks?: bool @go(SkipHooks)
|
||||
|
||||
// ApiVersions is the kubernetes apiversions used for Capabilities.APIVersions
|
||||
apiVersions?: [...string] @go(ApiVersions,[]string)
|
||||
|
||||
// KubeVersion is the kubernetes version used by Helm for Capabilities.KubeVersion"
|
||||
kubeVersion?: string @go(KubeVersion)
|
||||
|
||||
// NameTemplate is for specifying the name template used to name the release.
|
||||
nameTemplate?: string @go(NameTemplate)
|
||||
|
||||
// SkipTests skips tests from templated output.
|
||||
skipTests?: bool @go(SkipTests)
|
||||
}
|
||||
|
||||
// HelmChartArgs contains arguments to helm.
|
||||
// Deprecated. Use HelmGlobals and HelmChart instead.
|
||||
#HelmChartArgs: {
|
||||
chartName?: string @go(ChartName)
|
||||
chartVersion?: string @go(ChartVersion)
|
||||
chartRepoUrl?: string @go(ChartRepoURL)
|
||||
chartHome?: string @go(ChartHome)
|
||||
chartRepoName?: string @go(ChartRepoName)
|
||||
helmBin?: string @go(HelmBin)
|
||||
helmHome?: string @go(HelmHome)
|
||||
values?: string @go(Values)
|
||||
valuesLocal?: {...} @go(ValuesLocal,map[string]interface{})
|
||||
valuesMerge?: string @go(ValuesMerge)
|
||||
releaseName?: string @go(ReleaseName)
|
||||
releaseNamespace?: string @go(ReleaseNamespace)
|
||||
extraArgs?: [...string] @go(ExtraArgs,[]string)
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
#Cloud: string // #enumCloud
|
||||
|
||||
#enumCloud:
|
||||
#GKE
|
||||
|
||||
#GKE: #Cloud & "gke"
|
||||
|
||||
// IAMPolicyGeneratorArgs contains arguments to generate a GKE service account resource.
|
||||
#IAMPolicyGeneratorArgs: {
|
||||
// which cloud provider to generate for (e.g. "gke")
|
||||
cloud: #Cloud @go(Cloud)
|
||||
|
||||
// information about the kubernetes cluster for this object
|
||||
kubernetesService: #KubernetesService @go(KubernetesService)
|
||||
|
||||
// information about the service account and project
|
||||
serviceAccount: #ServiceAccount @go(ServiceAccount)
|
||||
}
|
||||
|
||||
#KubernetesService: {
|
||||
// the name used for the Kubernetes service account
|
||||
name: string @go(Name)
|
||||
|
||||
// the name of the Kubernetes namespace for this object
|
||||
namespace?: string @go(Namespace)
|
||||
}
|
||||
|
||||
#ServiceAccount: {
|
||||
// the name of the new cloud provider service account
|
||||
name: string @go(Name)
|
||||
|
||||
// The ID of the project
|
||||
projectId: string @go(ProjectId)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// Image contains an image name, a new name, a new tag or digest,
|
||||
// which will replace the original name and tag.
|
||||
#Image: {
|
||||
// Name is a tag-less image name.
|
||||
name?: string @go(Name)
|
||||
|
||||
// NewName is the value used to replace the original name.
|
||||
newName?: string @go(NewName)
|
||||
|
||||
// TagSuffix is the value used to suffix the original tag
|
||||
// If Digest and NewTag is present an error is thrown
|
||||
tagSuffix?: string @go(TagSuffix)
|
||||
|
||||
// NewTag is the value used to replace the original tag.
|
||||
newTag?: string @go(NewTag)
|
||||
|
||||
// Digest is the value used to replace the original image tag.
|
||||
// If digest is present NewTag value is ignored.
|
||||
digest?: string @go(Digest)
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
#KustomizationVersion: "kustomize.config.k8s.io/v1beta1"
|
||||
#KustomizationKind: "Kustomization"
|
||||
#ComponentVersion: "kustomize.config.k8s.io/v1alpha1"
|
||||
#ComponentKind: "Component"
|
||||
#MetadataNamespacePath: "metadata/namespace"
|
||||
#MetadataNamespaceApiVersion: "v1"
|
||||
#MetadataNamePath: "metadata/name"
|
||||
#OriginAnnotations: "originAnnotations"
|
||||
#TransformerAnnotations: "transformerAnnotations"
|
||||
#ManagedByLabelOption: "managedByLabel"
|
||||
|
||||
// Kustomization holds the information needed to generate customized k8s api resources.
|
||||
#Kustomization: {
|
||||
#TypeMeta
|
||||
|
||||
// MetaData is a pointer to avoid marshalling empty struct
|
||||
metadata?: null | #ObjectMeta @go(MetaData,*ObjectMeta)
|
||||
|
||||
// OpenAPI contains information about what kubernetes schema to use.
|
||||
openapi?: {[string]: string} @go(OpenAPI,map[string]string)
|
||||
|
||||
// NamePrefix will prefix the names of all resources mentioned in the kustomization
|
||||
// file including generated configmaps and secrets.
|
||||
namePrefix?: string @go(NamePrefix)
|
||||
|
||||
// NameSuffix will suffix the names of all resources mentioned in the kustomization
|
||||
// file including generated configmaps and secrets.
|
||||
nameSuffix?: string @go(NameSuffix)
|
||||
|
||||
// Namespace to add to all objects.
|
||||
namespace?: string @go(Namespace)
|
||||
|
||||
// CommonLabels to add to all objects and selectors.
|
||||
commonLabels?: {[string]: string} @go(CommonLabels,map[string]string)
|
||||
|
||||
// Labels to add to all objects but not selectors.
|
||||
labels?: [...#Label] @go(Labels,[]Label)
|
||||
|
||||
// CommonAnnotations to add to all objects.
|
||||
commonAnnotations?: {[string]: string} @go(CommonAnnotations,map[string]string)
|
||||
|
||||
// Deprecated: Use the Patches field instead, which provides a superset of the functionality of PatchesStrategicMerge.
|
||||
// PatchesStrategicMerge specifies the relative path to a file
|
||||
// containing a strategic merge patch. Format documented at
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md
|
||||
// URLs and globs are not supported.
|
||||
patchesStrategicMerge?: [...#PatchStrategicMerge] @go(PatchesStrategicMerge,[]PatchStrategicMerge)
|
||||
|
||||
// Deprecated: Use the Patches field instead, which provides a superset of the functionality of JSONPatches.
|
||||
// JSONPatches is a list of JSONPatch for applying JSON patch.
|
||||
// Format documented at https://tools.ietf.org/html/rfc6902
|
||||
// and http://jsonpatch.com
|
||||
patchesJson6902?: [...#Patch] @go(PatchesJson6902,[]Patch)
|
||||
|
||||
// Patches is a list of patches, where each one can be either a
|
||||
// Strategic Merge Patch or a JSON patch.
|
||||
// Each patch can be applied to multiple target objects.
|
||||
patches?: [...#Patch] @go(Patches,[]Patch)
|
||||
|
||||
// Images is a list of (image name, new name, new tag or digest)
|
||||
// for changing image names, tags or digests. This can also be achieved with a
|
||||
// patch, but this operator is simpler to specify.
|
||||
images?: [...#Image] @go(Images,[]Image)
|
||||
|
||||
// Deprecated: Use the Images field instead.
|
||||
imageTags?: [...#Image] @go(ImageTags,[]Image)
|
||||
|
||||
// Replacements is a list of replacements, which will copy nodes from a
|
||||
// specified source to N specified targets.
|
||||
replacements?: [...#ReplacementField] @go(Replacements,[]ReplacementField)
|
||||
|
||||
// Replicas is a list of {resourcename, count} that allows for simpler replica
|
||||
// specification. This can also be done with a patch.
|
||||
replicas?: [...#Replica] @go(Replicas,[]Replica)
|
||||
|
||||
// Deprecated: Vars will be removed in future release. Migrate to Replacements instead.
|
||||
// Vars allow things modified by kustomize to be injected into a
|
||||
// kubernetes object specification. A var is a name (e.g. FOO) associated
|
||||
// with a field in a specific resource instance. The field must
|
||||
// contain a value of type string/bool/int/float, and defaults to the name field
|
||||
// of the instance. Any appearance of "$(FOO)" in the object
|
||||
// spec will be replaced at kustomize build time, after the final
|
||||
// value of the specified field has been determined.
|
||||
vars?: [...#Var] @go(Vars,[]Var)
|
||||
|
||||
// SortOptions change the order that kustomize outputs resources.
|
||||
sortOptions?: null | #SortOptions @go(SortOptions,*SortOptions)
|
||||
|
||||
// Resources specifies relative paths to files holding YAML representations
|
||||
// of kubernetes API objects, or specifications of other kustomizations
|
||||
// via relative paths, absolute paths, or URLs.
|
||||
resources?: [...string] @go(Resources,[]string)
|
||||
|
||||
// Components specifies relative paths to specifications of other Components
|
||||
// via relative paths, absolute paths, or URLs.
|
||||
components?: [...string] @go(Components,[]string)
|
||||
|
||||
// Crds specifies relative paths to Custom Resource Definition files.
|
||||
// This allows custom resources to be recognized as operands, making
|
||||
// it possible to add them to the Resources list.
|
||||
// CRDs themselves are not modified.
|
||||
crds?: [...string] @go(Crds,[]string)
|
||||
|
||||
// Deprecated: Anything that would have been specified here should be specified in the Resources field instead.
|
||||
bases?: [...string] @go(Bases,[]string)
|
||||
|
||||
// ConfigMapGenerator is a list of configmaps to generate from
|
||||
// local data (one configMap per list item).
|
||||
// The resulting resource is a normal operand, subject to
|
||||
// name prefixing, patching, etc. By default, the name of
|
||||
// the map will have a suffix hash generated from its contents.
|
||||
configMapGenerator?: [...#ConfigMapArgs] @go(ConfigMapGenerator,[]ConfigMapArgs)
|
||||
|
||||
// SecretGenerator is a list of secrets to generate from
|
||||
// local data (one secret per list item).
|
||||
// The resulting resource is a normal operand, subject to
|
||||
// name prefixing, patching, etc. By default, the name of
|
||||
// the map will have a suffix hash generated from its contents.
|
||||
secretGenerator?: [...#SecretArgs] @go(SecretGenerator,[]SecretArgs)
|
||||
|
||||
// HelmGlobals contains helm configuration that isn't chart specific.
|
||||
helmGlobals?: null | #HelmGlobals @go(HelmGlobals,*HelmGlobals)
|
||||
|
||||
// HelmCharts is a list of helm chart configuration instances.
|
||||
helmCharts?: [...#HelmChart] @go(HelmCharts,[]HelmChart)
|
||||
|
||||
// HelmChartInflationGenerator is a list of helm chart configurations.
|
||||
// Deprecated. Auto-converted to HelmGlobals and HelmCharts.
|
||||
helmChartInflationGenerator?: [...#HelmChartArgs] @go(HelmChartInflationGenerator,[]HelmChartArgs)
|
||||
|
||||
// GeneratorOptions modify behavior of all ConfigMap and Secret generators.
|
||||
generatorOptions?: null | #GeneratorOptions @go(GeneratorOptions,*GeneratorOptions)
|
||||
|
||||
// Configurations is a list of transformer configuration files
|
||||
configurations?: [...string] @go(Configurations,[]string)
|
||||
|
||||
// Generators is a list of files containing custom generators
|
||||
generators?: [...string] @go(Generators,[]string)
|
||||
|
||||
// Transformers is a list of files containing transformers
|
||||
transformers?: [...string] @go(Transformers,[]string)
|
||||
|
||||
// Validators is a list of files containing validators
|
||||
validators?: [...string] @go(Validators,[]string)
|
||||
|
||||
// BuildMetadata is a list of strings used to toggle different build options
|
||||
buildMetadata?: [...string] @go(BuildMetadata,[]string)
|
||||
}
|
||||
|
||||
_#deprecatedWarningToRunEditFix: "Run 'kustomize edit fix' to update your Kustomization automatically."
|
||||
_#deprecatedWarningToRunEditFixExperimential: "[EXPERIMENTAL] Run 'kustomize edit fix' to update your Kustomization automatically."
|
||||
_#deprecatedBaseWarningMessage: "# Warning: 'bases' is deprecated. Please use 'resources' instead. Run 'kustomize edit fix' to update your Kustomization automatically."
|
||||
_#deprecatedImageTagsWarningMessage: "# Warning: 'imageTags' is deprecated. Please use 'images' instead. Run 'kustomize edit fix' to update your Kustomization automatically."
|
||||
_#deprecatedPatchesJson6902Message: "# Warning: 'patchesJson6902' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically."
|
||||
_#deprecatedPatchesStrategicMergeMessage: "# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically."
|
||||
_#deprecatedVarsMessage: "# Warning: 'vars' is deprecated. Please use 'replacements' instead. [EXPERIMENTAL] Run 'kustomize edit fix' to update your Kustomization automatically."
|
||||
_#deprecatedCommonLabelsWarningMessage: "# Warning: 'commonLabels' is deprecated. Please use 'labels' instead. Run 'kustomize edit fix' to update your Kustomization automatically."
|
||||
@@ -0,0 +1,37 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// KvPairSources defines places to obtain key value pairs.
|
||||
#KvPairSources: {
|
||||
// LiteralSources is a list of literal
|
||||
// pair sources. Each literal source should
|
||||
// be a key and literal value, e.g. `key=value`
|
||||
literals?: [...string] @go(LiteralSources,[]string)
|
||||
|
||||
// FileSources is a list of file "sources" to
|
||||
// use in creating a list of key, value pairs.
|
||||
// A source takes the form: [{key}=]{path}
|
||||
// If the "key=" part is missing, the key is the
|
||||
// path's basename. If they "key=" part is present,
|
||||
// it becomes the key (replacing the basename).
|
||||
// In either case, the value is the file contents.
|
||||
// Specifying a directory will iterate each named
|
||||
// file in the directory whose basename is a
|
||||
// valid configmap key.
|
||||
files?: [...string] @go(FileSources,[]string)
|
||||
|
||||
// EnvSources is a list of file paths.
|
||||
// The contents of each file should be one
|
||||
// key=value pair per line, e.g. a Docker
|
||||
// or npm ".env" file or a ".ini" file
|
||||
// (wikipedia.org/wiki/INI_file)
|
||||
envs?: [...string] @go(EnvSources,[]string)
|
||||
|
||||
// Older, singular form of EnvSources.
|
||||
// On edits (e.g. `kustomize fix`) this is merged into the plural form
|
||||
// for consistency with LiteralSources and FileSources.
|
||||
env?: string @go(EnvSource)
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
#Label: {
|
||||
// Pairs contains the key-value pairs for labels to add
|
||||
pairs?: {[string]: string} @go(Pairs,map[string]string)
|
||||
|
||||
// IncludeSelectors inidicates should transformer include the
|
||||
// fieldSpecs for selectors. Custom fieldSpecs specified by
|
||||
// FieldSpecs will be merged with builtin fieldSpecs if this
|
||||
// is true.
|
||||
includeSelectors?: bool @go(IncludeSelectors)
|
||||
|
||||
// IncludeTemplates inidicates should transformer include the
|
||||
// spec/template/metadata fieldSpec. Custom fieldSpecs specified by
|
||||
// FieldSpecs will be merged with spec/template/metadata fieldSpec if this
|
||||
// is true. If IncludeSelectors is true, IncludeTemplates is not needed.
|
||||
includeTemplates?: bool @go(IncludeTemplates)
|
||||
fields?: [...#FieldSpec] @go(FieldSpecs,[]FieldSpec)
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// Restrictions on what things can be referred to
|
||||
// in a kustomization file.
|
||||
//
|
||||
//go:generate stringer -type=LoadRestrictions
|
||||
#LoadRestrictions: int // #enumLoadRestrictions
|
||||
|
||||
#enumLoadRestrictions:
|
||||
#LoadRestrictionsUnknown |
|
||||
#LoadRestrictionsRootOnly |
|
||||
#LoadRestrictionsNone
|
||||
|
||||
#values_LoadRestrictions: {
|
||||
LoadRestrictionsUnknown: #LoadRestrictionsUnknown
|
||||
LoadRestrictionsRootOnly: #LoadRestrictionsRootOnly
|
||||
LoadRestrictionsNone: #LoadRestrictionsNone
|
||||
}
|
||||
|
||||
#LoadRestrictionsUnknown: #LoadRestrictions & 0
|
||||
|
||||
// Files referenced by a kustomization file must be in
|
||||
// or under the directory holding the kustomization
|
||||
// file itself.
|
||||
#LoadRestrictionsRootOnly: #LoadRestrictions & 1
|
||||
|
||||
// The kustomization file may specify absolute or
|
||||
// relative paths to patch or resources files outside
|
||||
// its own tree.
|
||||
#LoadRestrictionsNone: #LoadRestrictions & 2
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
_#_LoadRestrictions_name: "LoadRestrictionsUnknownLoadRestrictionsRootOnlyLoadRestrictionsNone"
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// ObjectMeta partially copies apimachinery/pkg/apis/meta/v1.ObjectMeta
|
||||
// No need for a direct dependence; the fields are stable.
|
||||
#ObjectMeta: {
|
||||
name?: string @go(Name)
|
||||
namespace?: string @go(Namespace)
|
||||
labels?: {[string]: string} @go(Labels,map[string]string)
|
||||
annotations?: {[string]: string} @go(Annotations,map[string]string)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// Pair is a key value pair.
|
||||
#Pair: {
|
||||
Key: string
|
||||
Value: string
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// Patch represent either a Strategic Merge Patch or a JSON patch
|
||||
// and its targets.
|
||||
// The content of the patch can either be from a file
|
||||
// or from an inline string.
|
||||
#Patch: {
|
||||
// Path is a relative file path to the patch file.
|
||||
path?: string @go(Path)
|
||||
|
||||
// Patch is the content of a patch.
|
||||
patch?: string @go(Patch)
|
||||
|
||||
// Target points to the resources that the patch is applied to
|
||||
target?: #Target | #Selector @go(Target,*Selector)
|
||||
|
||||
// Options is a list of options for the patch
|
||||
options?: {[string]: bool} @go(Options,map[string]bool)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// PatchStrategicMerge represents a relative path to a
|
||||
// stategic merge patch with the format
|
||||
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md
|
||||
#PatchStrategicMerge: string
|
||||
@@ -0,0 +1,27 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
#HelmConfig: {
|
||||
Enabled: bool
|
||||
Command: string
|
||||
ApiVersions: [...string] @go(,[]string)
|
||||
KubeVersion: string
|
||||
}
|
||||
|
||||
// PluginConfig holds plugin configuration.
|
||||
#PluginConfig: {
|
||||
// PluginRestrictions distinguishes plugin restrictions.
|
||||
PluginRestrictions: #PluginRestrictions
|
||||
|
||||
// BpLoadingOptions distinguishes builtin plugin behaviors.
|
||||
BpLoadingOptions: #BuiltinPluginLoadingOptions
|
||||
|
||||
// FnpLoadingOptions sets the way function-based plugin behaviors.
|
||||
FnpLoadingOptions: #FnPluginLoadingOptions
|
||||
|
||||
// HelmConfig contains metadata needed for allowing and running helm.
|
||||
HelmConfig: #HelmConfig
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// Some plugin classes
|
||||
// - builtin: plugins defined in the kustomize repo.
|
||||
// May be freely used and re-configured.
|
||||
// - local: plugins that aren't builtin but are
|
||||
// locally defined (presumably by the user), meaning
|
||||
// the kustomization refers to them via a relative
|
||||
// file path, not a URL.
|
||||
// - remote: require a build-time download to obtain.
|
||||
// Unadvised, unless one controls the
|
||||
// serving site.
|
||||
//
|
||||
//go:generate stringer -type=PluginRestrictions
|
||||
#PluginRestrictions: int // #enumPluginRestrictions
|
||||
|
||||
#enumPluginRestrictions:
|
||||
#PluginRestrictionsUnknown |
|
||||
#PluginRestrictionsBuiltinsOnly |
|
||||
#PluginRestrictionsNone
|
||||
|
||||
#values_PluginRestrictions: {
|
||||
PluginRestrictionsUnknown: #PluginRestrictionsUnknown
|
||||
PluginRestrictionsBuiltinsOnly: #PluginRestrictionsBuiltinsOnly
|
||||
PluginRestrictionsNone: #PluginRestrictionsNone
|
||||
}
|
||||
|
||||
#PluginRestrictionsUnknown: #PluginRestrictions & 0
|
||||
|
||||
// Non-builtin plugins completely disabled.
|
||||
#PluginRestrictionsBuiltinsOnly: #PluginRestrictions & 1
|
||||
|
||||
// No restrictions, do whatever you want.
|
||||
#PluginRestrictionsNone: #PluginRestrictions & 2
|
||||
|
||||
// BuiltinPluginLoadingOptions distinguish ways in which builtin plugins are used.
|
||||
//go:generate stringer -type=BuiltinPluginLoadingOptions
|
||||
#BuiltinPluginLoadingOptions: int // #enumBuiltinPluginLoadingOptions
|
||||
|
||||
#enumBuiltinPluginLoadingOptions:
|
||||
#BploUndefined |
|
||||
#BploUseStaticallyLinked |
|
||||
#BploLoadFromFileSys
|
||||
|
||||
#values_BuiltinPluginLoadingOptions: {
|
||||
BploUndefined: #BploUndefined
|
||||
BploUseStaticallyLinked: #BploUseStaticallyLinked
|
||||
BploLoadFromFileSys: #BploLoadFromFileSys
|
||||
}
|
||||
|
||||
#BploUndefined: #BuiltinPluginLoadingOptions & 0
|
||||
|
||||
// Desired in production use for performance.
|
||||
#BploUseStaticallyLinked: #BuiltinPluginLoadingOptions & 1
|
||||
|
||||
// Desired in testing and development cycles where it's undesirable
|
||||
// to generate static code.
|
||||
#BploLoadFromFileSys: #BuiltinPluginLoadingOptions & 2
|
||||
|
||||
// FnPluginLoadingOptions set way functions-based plugins are restricted
|
||||
#FnPluginLoadingOptions: {
|
||||
// Allow to run executables
|
||||
EnableExec: bool
|
||||
|
||||
// Allow to run starlark
|
||||
EnableStar: bool
|
||||
|
||||
// Allow container access to network
|
||||
Network: bool
|
||||
NetworkName: string
|
||||
|
||||
// list of mounts
|
||||
Mounts: [...string] @go(,[]string)
|
||||
|
||||
// list of env variables to pass to fn
|
||||
Env: [...string] @go(,[]string)
|
||||
|
||||
// Run as uid and gid of the command executor
|
||||
AsCurrentUser: bool
|
||||
|
||||
// Run in this working directory
|
||||
WorkingDir: string
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
_#_PluginRestrictions_name: "PluginRestrictionsUnknownPluginRestrictionsBuiltinsOnlyPluginRestrictionsNone"
|
||||
@@ -0,0 +1,57 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
#DefaultReplacementFieldPath: "metadata.name"
|
||||
|
||||
// Replacement defines how to perform a substitution
|
||||
// where it is from and where it is to.
|
||||
#Replacement: {
|
||||
// The source of the value.
|
||||
source?: null | #SourceSelector @go(Source,*SourceSelector)
|
||||
|
||||
// The N fields to write the value to.
|
||||
targets?: [...null | #TargetSelector] @go(Targets,[]*TargetSelector)
|
||||
}
|
||||
|
||||
// SourceSelector is the source of the replacement transformer.
|
||||
#SourceSelector: {
|
||||
// Structured field path expected in the allowed object.
|
||||
fieldPath?: string @go(FieldPath)
|
||||
|
||||
// Used to refine the interpretation of the field.
|
||||
options?: null | #FieldOptions @go(Options,*FieldOptions)
|
||||
}
|
||||
|
||||
// TargetSelector specifies fields in one or more objects.
|
||||
#TargetSelector: {
|
||||
// Include objects that match this.
|
||||
select?: null | #Selector @go(Select,*Selector)
|
||||
|
||||
// From the allowed set, remove objects that match this.
|
||||
reject?: [...null | #Selector] @go(Reject,[]*Selector)
|
||||
|
||||
// Structured field paths expected in each allowed object.
|
||||
fieldPaths?: [...string] @go(FieldPaths,[]string)
|
||||
|
||||
// Used to refine the interpretation of the field.
|
||||
options?: null | #FieldOptions @go(Options,*FieldOptions)
|
||||
}
|
||||
|
||||
// FieldOptions refine the interpretation of FieldPaths.
|
||||
#FieldOptions: {
|
||||
// Used to split/join the field.
|
||||
delimiter?: string @go(Delimiter)
|
||||
|
||||
// Which position in the split to consider.
|
||||
index?: int @go(Index)
|
||||
|
||||
// TODO (#3492): Implement use of this option
|
||||
// None, Base64, URL, Hex, etc
|
||||
encoding?: string @go(Encoding)
|
||||
|
||||
// If field missing, add it.
|
||||
create?: bool @go(Create)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
#ReplacementField: {
|
||||
#Replacement
|
||||
path?: string @go(Path)
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// Replica specifies a modification to a replica config.
|
||||
// The number of replicas of a resource whose name matches will be set to count.
|
||||
// This struct is used by the ReplicaCountTransform, and is meant to supplement
|
||||
// the existing patch functionality with a simpler syntax for replica configuration.
|
||||
#Replica: {
|
||||
// The name of the resource to change the replica count
|
||||
name?: string @go(Name)
|
||||
|
||||
// The number of replicas required.
|
||||
count: int64 @go(Count)
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// SecretArgs contains the metadata of how to generate a secret.
|
||||
#SecretArgs: {
|
||||
#GeneratorArgs
|
||||
|
||||
// Type of the secret.
|
||||
//
|
||||
// This is the same field as the secret type field in v1/Secret:
|
||||
// It can be "Opaque" (default), or "kubernetes.io/tls".
|
||||
//
|
||||
// If type is "kubernetes.io/tls", then "literals" or "files" must have exactly two
|
||||
// keys: "tls.key" and "tls.crt"
|
||||
type?: string @go(Type)
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// Selector specifies a set of resources.
|
||||
// Any resource that matches intersection of all conditions
|
||||
// is included in this set.
|
||||
#Selector: {
|
||||
// AnnotationSelector is a string that follows the label selection expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource annotations.
|
||||
annotationSelector?: string @go(AnnotationSelector)
|
||||
|
||||
// LabelSelector is a string that follows the label selection expression
|
||||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api
|
||||
// It matches with the resource labels.
|
||||
labelSelector?: string @go(LabelSelector)
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// Code generated by cue get go. DO NOT EDIT.
|
||||
|
||||
//cue:generate cue get go sigs.k8s.io/kustomize/api/types
|
||||
|
||||
package types
|
||||
|
||||
// SortOptions defines the order that kustomize outputs resources.
|
||||
#SortOptions: {
|
||||
// Order selects the ordering strategy.
|
||||
order?: #SortOrder @go(Order)
|
||||
|
||||
// LegacySortOptions tweaks the sorting for the "legacy" sort ordering
|
||||
// strategy.
|
||||
legacySortOptions?: null | #LegacySortOptions @go(LegacySortOptions,*LegacySortOptions)
|
||||
}
|
||||
|
||||
// SortOrder defines different ordering strategies.
|
||||
#SortOrder: string // #enumSortOrder
|
||||
|
||||
#enumSortOrder:
|
||||
#LegacySortOrder |
|
||||
#FIFOSortOrder
|
||||
|
||||
#LegacySortOrder: #SortOrder & "legacy"
|
||||
|
||||
#FIFOSortOrder: #SortOrder & "fifo"
|
||||
|
||||
// LegacySortOptions define various options for tweaking the "legacy" ordering
|
||||
// strategy.
|
||||
#LegacySortOptions: {
|
||||
// OrderFirst selects the resource kinds to order first.
|
||||
orderFirst: [...string] @go(OrderFirst,[]string)
|
||||
|
||||
// OrderLast selects the resource kinds to order last.
|
||||
orderLast: [...string] @go(OrderLast,[]string)
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user