mirror of
https://github.com/holos-run/holos.git
synced 2026-03-19 16:54:58 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f1eed3f06 | ||
|
|
7fb7df1441 | ||
|
|
a798111d4d | ||
|
|
3ddb823341 | ||
|
|
70d48592c4 | ||
|
|
006f08df93 | ||
|
|
39e2db5d37 | ||
|
|
ceb293fd8a | ||
|
|
188ff95015 |
@@ -29,6 +29,7 @@
|
||||
"authpolicy",
|
||||
"authproxy",
|
||||
"authroutes",
|
||||
"autoload",
|
||||
"automount",
|
||||
"automounting",
|
||||
"autoscaler",
|
||||
@@ -59,6 +60,7 @@
|
||||
"Cmds",
|
||||
"CNCF",
|
||||
"CODEOWNERS",
|
||||
"compinit",
|
||||
"componentconfig",
|
||||
"configdir",
|
||||
"configmap",
|
||||
@@ -153,6 +155,7 @@
|
||||
"jetstack",
|
||||
"jiralert",
|
||||
"Jsonnet",
|
||||
"Kargo",
|
||||
"kfbh",
|
||||
"killall",
|
||||
"kubeadm",
|
||||
|
||||
20
doc/md/topics/kargo.mdx
Normal file
20
doc/md/topics/kargo.mdx
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
description: Kargo
|
||||
slug: kargo
|
||||
sidebar_position: 110
|
||||
---
|
||||
|
||||
# Kargo
|
||||
|
||||
Holos pairs nicely with [Kargo], offering a holistic solution for code
|
||||
promotion across stages.
|
||||
|
||||
Watch this space for a more detailed write up of the integration being
|
||||
developed.
|
||||
|
||||
If you're interested in this topic, please thumbs up the [Kargo
|
||||
Topic](https://github.com/holos-run/holos/issues/378) issue, or drop into
|
||||
[Discord] and let us know about your use case.
|
||||
|
||||
[Kargo]: https://kargo.io/
|
||||
[Discord]: https://discord.gg/JgDVbNpye7
|
||||
65
doc/md/topics/oci-helm-charts.mdx
Normal file
65
doc/md/topics/oci-helm-charts.mdx
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
description: OCI Helm Charts
|
||||
slug: oci-helm-charts
|
||||
sidebar_position: 710
|
||||
---
|
||||
|
||||
# OCI Helm Charts
|
||||
|
||||
Holos supports OCI Helm charts. Use the following example to get started.
|
||||
|
||||
```bash
|
||||
mkdir -p oci-helm && cd oci-helm
|
||||
holos init platform v1alpha5
|
||||
```
|
||||
|
||||
```bash
|
||||
mkdir -p components/podinfo-oci
|
||||
cat <<EOF > components/podinfo-oci/podinfo-oci.cue
|
||||
```
|
||||
```cue showLineNumbers
|
||||
package holos
|
||||
|
||||
holos: Component.BuildPlan
|
||||
|
||||
Component: #Helm & {
|
||||
Chart: {
|
||||
name: "oci://ghcr.io/stefanprodan/charts/podinfo"
|
||||
release: "podinfo"
|
||||
version: "6.6.2"
|
||||
}
|
||||
}
|
||||
```
|
||||
```bash
|
||||
EOF
|
||||
```
|
||||
|
||||
Register the component with the platform.
|
||||
|
||||
```bash
|
||||
cat <<EOF >platform/podinfo-oci.cue
|
||||
```
|
||||
```cue showLineNumbers
|
||||
package holos
|
||||
|
||||
Platform: Components: podinfo: {
|
||||
name: "podinfo-oci"
|
||||
path: "components/podinfo-oci"
|
||||
}
|
||||
```
|
||||
```bash
|
||||
EOF
|
||||
```
|
||||
|
||||
The OCI chart is cached in the vendor directory and rendered.
|
||||
|
||||
```bash
|
||||
holos render platform
|
||||
```
|
||||
|
||||
```txt
|
||||
Pulled: ghcr.io/stefanprodan/charts/podinfo:6.6.2
|
||||
Digest: sha256:83295d47de6d6ca634ed4b952a7572fc176bcc38854d0c11ca0fa197bc5f1154
|
||||
rendered podinfo-oci in 7.21581325s
|
||||
rendered platform in 7.216199167s
|
||||
```
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
description: Private Helm Repositories
|
||||
slug: private-helm
|
||||
sidebar_position: 999
|
||||
sidebar_position: 700
|
||||
---
|
||||
|
||||
# Private Helm
|
||||
|
||||
@@ -45,7 +45,40 @@ holos init platform v1alpha5
|
||||
|
||||
### Using an example Component
|
||||
|
||||
<CommonComponent />
|
||||
Create a directory for the example `podinfo` component we'll use to render
|
||||
platform manifests.
|
||||
|
||||
```bash
|
||||
mkdir -p components/podinfo
|
||||
```
|
||||
|
||||
Create the CUE configuration for the example `podinfo` component.
|
||||
|
||||
```bash
|
||||
cat <<EOF >components/podinfo/podinfo.cue
|
||||
```
|
||||
```cue showLineNumbers
|
||||
package holos
|
||||
|
||||
holos: Component.BuildPlan
|
||||
|
||||
Component: #Helm & {
|
||||
Chart: {
|
||||
name: "podinfo"
|
||||
version: "6.6.2"
|
||||
repository: {
|
||||
name: "podinfo"
|
||||
url: "https://stefanprodan.github.io/podinfo"
|
||||
}
|
||||
}
|
||||
Values: ui: {
|
||||
message: string | *"Hello World" @tag(message, type=string)
|
||||
}
|
||||
}
|
||||
```
|
||||
```bash
|
||||
EOF
|
||||
```
|
||||
|
||||
We'll integrate the component with the platform after we define the
|
||||
configuration structures.
|
||||
@@ -277,6 +310,9 @@ let ProdPodinfo = {
|
||||
parameters: EnvironmentName: "prod-\(_city)"
|
||||
}
|
||||
```
|
||||
```
|
||||
EOF
|
||||
```
|
||||
|
||||
### Using the environment
|
||||
|
||||
|
||||
@@ -38,8 +38,23 @@ go install github.com/holos-run/holos/cmd/holos@latest
|
||||
|
||||
### Completion
|
||||
|
||||
:::tip
|
||||
Completion is automatically enabled if [brew shell
|
||||
completion](https://docs.brew.sh/Shell-Completion) is also enabled.
|
||||
:::
|
||||
|
||||
<Tabs groupId="65F79D28-2E57-4A90-8EBA-3D8758C80233">
|
||||
<TabItem value="zsh" label="zsh">
|
||||
|
||||
Add the following to `~/.zshrc` if not already present to initialize zsh completion.
|
||||
|
||||
```bash
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
```
|
||||
|
||||
Then load holos completion after zsh completion has been initialized.
|
||||
|
||||
```bash
|
||||
source <(holos completion zsh)
|
||||
```
|
||||
|
||||
@@ -2,15 +2,15 @@ import styles from './styles.module.css';
|
||||
|
||||
//Pulled from: https://gaudion.dev/blog/mdx-youtube-embed
|
||||
//components/mdx/YouTube.tsx
|
||||
export default function YouTube ({ id } : { id : string }){
|
||||
return (
|
||||
<div class={styles.videoWrapper}>
|
||||
<iframe
|
||||
className="aspect-video w-full"
|
||||
src={"https://www.youtube.com/embed/" + id}
|
||||
title="YouTube Video Player"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
></iframe>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
export default function YouTube({ id }: { id: string }) {
|
||||
return (
|
||||
<div className={styles.videoWrapper}>
|
||||
<iframe
|
||||
className="aspect-video w-full"
|
||||
src={"https://www.youtube.com/embed/" + id + "?rel=0"}
|
||||
title="YouTube Video Player"
|
||||
allow="picture-in-picture; fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope;"
|
||||
></iframe>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f projects/argocd/components/kargo/vendor/1.0.3/kargo/resources/crds/kargo.akuity.io_freights.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// Freight represents a collection of versioned artifacts.
|
||||
#Freight: {
|
||||
// Alias is a human-friendly alias for a piece of Freight. This is
|
||||
// an optional
|
||||
// field. A defaulting webhook will sync this field with the value
|
||||
// of the
|
||||
// kargo.akuity.io/alias label. When the alias label is not
|
||||
// present or differs
|
||||
// from the value of this field, the defaulting webhook will set
|
||||
// the label to
|
||||
// the value of this field. If the alias label is present and this
|
||||
// field is
|
||||
// empty, the defaulting webhook will set the value of this field
|
||||
// to the value
|
||||
// of the alias label. If this field is empty and the alias label
|
||||
// is not
|
||||
// present, the defaulting webhook will choose an available alias
|
||||
// and assign
|
||||
// it to both the field and label.
|
||||
alias?: string
|
||||
|
||||
// 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: "kargo.akuity.io/v1alpha1"
|
||||
|
||||
// Charts describes specific versions of specific Helm charts.
|
||||
charts?: [...{
|
||||
// Name specifies the name of the chart.
|
||||
name?: string
|
||||
|
||||
// RepoURL specifies the URL of a Helm chart repository. Classic
|
||||
// chart
|
||||
// repositories (using HTTP/S) can contain differently named
|
||||
// charts. When this
|
||||
// field points to such a repository, the Name field will specify
|
||||
// the name of
|
||||
// the chart within the repository. In the case of a repository
|
||||
// within an OCI
|
||||
// registry, the URL implicitly points to a specific chart and the
|
||||
// Name field
|
||||
// will be empty.
|
||||
repoURL?: string
|
||||
|
||||
// Version specifies a particular version of the chart.
|
||||
version?: string
|
||||
}]
|
||||
|
||||
// Commits describes specific Git repository commits.
|
||||
commits?: [...{
|
||||
// Author is the author of the commit.
|
||||
author?: string
|
||||
|
||||
// Branch denotes the branch of the repository where this commit
|
||||
// was found.
|
||||
branch?: string
|
||||
|
||||
// Committer is the person who committed the commit.
|
||||
committer?: string
|
||||
|
||||
// ID is the ID of a specific commit in the Git repository
|
||||
// specified by
|
||||
// RepoURL.
|
||||
id?: string
|
||||
|
||||
// Message is the message associated with the commit. At present,
|
||||
// this only
|
||||
// contains the first line (subject) of the commit message.
|
||||
message?: string
|
||||
|
||||
// RepoURL is the URL of a Git repository.
|
||||
repoURL?: string
|
||||
|
||||
// Tag denotes a tag in the repository that matched selection
|
||||
// criteria and
|
||||
// resolved to this commit.
|
||||
tag?: string
|
||||
}]
|
||||
|
||||
// Images describes specific versions of specific container
|
||||
// images.
|
||||
images?: [...{
|
||||
// Digest identifies a specific version of the image in the
|
||||
// repository
|
||||
// specified by RepoURL. This is a more precise identifier than
|
||||
// Tag.
|
||||
digest?: string
|
||||
|
||||
// GitRepoURL specifies the URL of a Git repository that contains
|
||||
// the source
|
||||
// code for the image repository referenced by the RepoURL field
|
||||
// if Kargo was
|
||||
// able to infer it.
|
||||
gitRepoURL?: string
|
||||
|
||||
// RepoURL describes the repository in which the image can be
|
||||
// found.
|
||||
repoURL?: string
|
||||
|
||||
// Tag identifies a specific version of the image in the
|
||||
// repository specified
|
||||
// by RepoURL.
|
||||
tag?: string
|
||||
}]
|
||||
|
||||
// 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: "Freight"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Origin describes a kind of Freight in terms of its origin.
|
||||
origin: {
|
||||
// Kind is the kind of resource from which Freight may have
|
||||
// originated. At
|
||||
// present, this can only be "Warehouse".
|
||||
kind: "Warehouse"
|
||||
|
||||
// Name is the name of the resource of the kind indicated by the
|
||||
// Kind field
|
||||
// from which Freight may originated.
|
||||
name: string
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f projects/argocd/components/kargo/vendor/1.0.3/kargo/resources/crds/kargo.akuity.io_projects.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// Project is a resource type that reconciles to a specially
|
||||
// labeled namespace
|
||||
// and other TODO: TBD project-level resources.
|
||||
#Project: {
|
||||
// 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: "kargo.akuity.io/v1alpha1"
|
||||
|
||||
// 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: "Project"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace?: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Spec describes a Project.
|
||||
spec!: #ProjectSpec
|
||||
}
|
||||
#ProjectSpec: {
|
||||
// PromotionPolicies defines policies governing the promotion of
|
||||
// Freight to
|
||||
// specific Stages within this Project.
|
||||
promotionPolicies?: [...{
|
||||
// AutoPromotionEnabled indicates whether new Freight can
|
||||
// automatically be
|
||||
// promoted into the Stage referenced by the Stage field. Note:
|
||||
// There are may
|
||||
// be other conditions also required for an auto-promotion to
|
||||
// occur. This
|
||||
// field defaults to false, but is commonly set to true for Stages
|
||||
// that
|
||||
// subscribe to Warehouses instead of other, upstream Stages. This
|
||||
// allows
|
||||
// users to define Stages that are automatically updated as soon
|
||||
// as new
|
||||
// artifacts are detected.
|
||||
autoPromotionEnabled?: bool
|
||||
stage: strings.MinRunes(1) & {
|
||||
=~"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
|
||||
}
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f projects/argocd/components/kargo/vendor/1.0.3/kargo/resources/crds/kargo.akuity.io_promotions.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// Promotion represents a request to transition a particular Stage
|
||||
// into a
|
||||
// particular Freight.
|
||||
#Promotion: {
|
||||
// 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: "kargo.akuity.io/v1alpha1"
|
||||
|
||||
// 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: "Promotion"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Spec describes the desired transition of a specific Stage into
|
||||
// a specific
|
||||
// Freight.
|
||||
spec!: #PromotionSpec
|
||||
}
|
||||
|
||||
// Spec describes the desired transition of a specific Stage into
|
||||
// a specific
|
||||
// Freight.
|
||||
#PromotionSpec: {
|
||||
// Freight specifies the piece of Freight to be promoted into the
|
||||
// Stage
|
||||
// referenced by the Stage field.
|
||||
freight: strings.MinRunes(1)
|
||||
|
||||
// Stage specifies the name of the Stage to which this Promotion
|
||||
// applies. The Stage referenced by this field MUST be in the same
|
||||
// namespace as the Promotion.
|
||||
stage: strings.MinRunes(1) & {
|
||||
=~"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
|
||||
}
|
||||
|
||||
// Steps specifies the directives to be executed as part of this
|
||||
// Promotion.
|
||||
// The order in which the directives are executed is the order in
|
||||
// which they
|
||||
// are listed in this field.
|
||||
steps?: [...{
|
||||
// As is the alias this step can be referred to as.
|
||||
as?: string
|
||||
|
||||
// Config is the configuration for the directive.
|
||||
config?: _
|
||||
|
||||
// Uses identifies a runner that can execute this step.
|
||||
uses: strings.MinRunes(1)
|
||||
}]
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f projects/argocd/components/kargo/vendor/1.0.3/kargo/resources/crds/kargo.akuity.io_stages.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// Stage is the Kargo API's main type.
|
||||
#Stage: {
|
||||
// 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: "kargo.akuity.io/v1alpha1"
|
||||
|
||||
// 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: "Stage"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Spec describes sources of Freight used by the Stage and how to
|
||||
// incorporate
|
||||
// Freight into the Stage.
|
||||
spec!: #StageSpec
|
||||
}
|
||||
|
||||
// Spec describes sources of Freight used by the Stage and how to
|
||||
// incorporate
|
||||
// Freight into the Stage.
|
||||
#StageSpec: {
|
||||
promotionTemplate?: {
|
||||
spec: {
|
||||
// Steps specifies the directives to be executed as part of a
|
||||
// Promotion.
|
||||
// The order in which the directives are executed is the order in
|
||||
// which they
|
||||
// are listed in this field.
|
||||
steps?: [...{
|
||||
// As is the alias this step can be referred to as.
|
||||
as?: string
|
||||
|
||||
// Config is the configuration for the directive.
|
||||
config?: _
|
||||
|
||||
// Uses identifies a runner that can execute this step.
|
||||
uses: strings.MinRunes(1)
|
||||
}] & [_, ...]
|
||||
}
|
||||
}
|
||||
|
||||
// RequestedFreight expresses the Stage's need for certain pieces
|
||||
// of Freight,
|
||||
// each having originated from a particular Warehouse. This list
|
||||
// must be
|
||||
// non-empty. In the common case, a Stage will request Freight
|
||||
// having
|
||||
// originated from just one specific Warehouse. In advanced cases,
|
||||
// requesting
|
||||
// Freight from multiple Warehouses provides a method of advancing
|
||||
// new
|
||||
// artifacts of different types through parallel pipelines at
|
||||
// different
|
||||
// speeds. This can be useful, for instance, if a Stage is home to
|
||||
// multiple
|
||||
// microservices that are independently versioned.
|
||||
requestedFreight: [...{
|
||||
// Origin specifies from where the requested Freight must have
|
||||
// originated.
|
||||
// This is a required field.
|
||||
origin: {
|
||||
// Kind is the kind of resource from which Freight may have
|
||||
// originated. At
|
||||
// present, this can only be "Warehouse".
|
||||
kind: "Warehouse"
|
||||
|
||||
// Name is the name of the resource of the kind indicated by the
|
||||
// Kind field
|
||||
// from which Freight may originated.
|
||||
name: string
|
||||
}
|
||||
|
||||
// Sources describes where the requested Freight may be obtained
|
||||
// from. This is
|
||||
// a required field.
|
||||
sources: {
|
||||
// Direct indicates the requested Freight may be obtained directly
|
||||
// from the
|
||||
// Warehouse from which it originated. If this field's value is
|
||||
// false, then
|
||||
// the value of the Stages field must be non-empty. i.e. Between
|
||||
// the two
|
||||
// fields, at least one source must be specified.
|
||||
direct?: bool
|
||||
|
||||
// Stages identifies other "upstream" Stages as potential sources
|
||||
// of the
|
||||
// requested Freight. If this field's value is empty, then the
|
||||
// value of the
|
||||
// Direct field must be true. i.e. Between the two fields, at
|
||||
// least on source
|
||||
// must be specified.
|
||||
stages?: [...string]
|
||||
}
|
||||
}] & [_, ...]
|
||||
|
||||
// Shard is the name of the shard that this Stage belongs to. This
|
||||
// is an
|
||||
// optional field. If not specified, the Stage will belong to the
|
||||
// default
|
||||
// shard. A defaulting webhook will sync the value of the
|
||||
// kargo.akuity.io/shard label with the value of this field. When
|
||||
// this field
|
||||
// is empty, the webhook will ensure that label is absent.
|
||||
shard?: string
|
||||
|
||||
// Verification describes how to verify a Stage's current Freight
|
||||
// is fit for
|
||||
// promotion downstream.
|
||||
verification?: {
|
||||
// AnalysisRunMetadata contains optional metadata that should be
|
||||
// applied to
|
||||
// all AnalysisRuns.
|
||||
analysisRunMetadata?: {
|
||||
// Additional annotations to apply to an AnalysisRun.
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
|
||||
// Additional labels to apply to an AnalysisRun.
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// AnalysisTemplates is a list of AnalysisTemplates from which
|
||||
// AnalysisRuns
|
||||
// should be created to verify a Stage's current Freight is fit to
|
||||
// be promoted
|
||||
// downstream.
|
||||
analysisTemplates?: [...{
|
||||
// Name is the name of the AnalysisTemplate in the same
|
||||
// project/namespace as
|
||||
// the Stage.
|
||||
name: string
|
||||
}]
|
||||
|
||||
// Args lists arguments that should be added to all AnalysisRuns.
|
||||
args?: [...{
|
||||
// Name is the name of the argument.
|
||||
name: string
|
||||
|
||||
// Value is the value of the argument.
|
||||
value: string
|
||||
}]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,399 @@
|
||||
// Code generated by timoni. DO NOT EDIT.
|
||||
|
||||
//timoni:generate timoni vendor crd -f projects/argocd/components/kargo/vendor/1.0.3/kargo/resources/crds/kargo.akuity.io_warehouses.yaml
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import "strings"
|
||||
|
||||
// Warehouse is a source of Freight.
|
||||
#Warehouse: {
|
||||
// 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: "kargo.akuity.io/v1alpha1"
|
||||
|
||||
// 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: "Warehouse"
|
||||
metadata!: {
|
||||
name!: strings.MaxRunes(253) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
namespace!: strings.MaxRunes(63) & strings.MinRunes(1) & {
|
||||
string
|
||||
}
|
||||
labels?: {
|
||||
[string]: string
|
||||
}
|
||||
annotations?: {
|
||||
[string]: string
|
||||
}
|
||||
}
|
||||
|
||||
// Spec describes sources of artifacts.
|
||||
spec!: #WarehouseSpec
|
||||
}
|
||||
|
||||
// Spec describes sources of artifacts.
|
||||
#WarehouseSpec: {
|
||||
// FreightCreationPolicy describes how Freight is created by this
|
||||
// Warehouse.
|
||||
// This field is optional. When left unspecified, the field is
|
||||
// implicitly
|
||||
// treated as if its value were "Automatic".
|
||||
freightCreationPolicy?: "Automatic" | "Manual" | *"Automatic"
|
||||
|
||||
// Interval is the reconciliation interval for this Warehouse. On
|
||||
// each
|
||||
// reconciliation, the Warehouse will discover new artifacts and
|
||||
// optionally
|
||||
// produce new Freight. This field is optional. When left
|
||||
// unspecified, the
|
||||
// field is implicitly treated as if its value were "5m0s".
|
||||
interval: =~"^([0-9]+(\\.[0-9]+)?(s|m|h))+$" | *"5m0s"
|
||||
|
||||
// Shard is the name of the shard that this Warehouse belongs to.
|
||||
// This is an
|
||||
// optional field. If not specified, the Warehouse will belong to
|
||||
// the default
|
||||
// shard. A defaulting webhook will sync this field with the value
|
||||
// of the
|
||||
// kargo.akuity.io/shard label. When the shard label is not
|
||||
// present or differs
|
||||
// from the value of this field, the defaulting webhook will set
|
||||
// the label to
|
||||
// the value of this field. If the shard label is present and this
|
||||
// field is
|
||||
// empty, the defaulting webhook will set the value of this field
|
||||
// to the value
|
||||
// of the shard label.
|
||||
shard?: string
|
||||
|
||||
// Subscriptions describes sources of artifacts to be included in
|
||||
// Freight
|
||||
// produced by this Warehouse.
|
||||
subscriptions: [...{
|
||||
// Chart describes a subscription to a Helm chart repository.
|
||||
chart?: {
|
||||
// DiscoveryLimit is an optional limit on the number of chart
|
||||
// versions that
|
||||
// can be discovered for this subscription. The limit is applied
|
||||
// after
|
||||
// filtering charts based on the SemverConstraint field.
|
||||
// When left unspecified, the field is implicitly treated as if
|
||||
// its value
|
||||
// were "20". The upper limit for this field is 100.
|
||||
discoveryLimit?: int & <=100 & >=1 | *20
|
||||
|
||||
// Name specifies the name of a Helm chart to subscribe to within
|
||||
// a classic
|
||||
// chart repository specified by the RepoURL field. This field is
|
||||
// required
|
||||
// when the RepoURL field points to a classic chart repository and
|
||||
// MUST
|
||||
// otherwise be empty.
|
||||
name?: string
|
||||
|
||||
// RepoURL specifies the URL of a Helm chart repository. It may be
|
||||
// a classic
|
||||
// chart repository (using HTTP/S) OR a repository within an OCI
|
||||
// registry.
|
||||
// Classic chart repositories can contain differently named
|
||||
// charts. When this
|
||||
// field points to such a repository, the Name field MUST also be
|
||||
// used
|
||||
// to specify the name of the desired chart within that
|
||||
// repository. In the
|
||||
// case of a repository within an OCI registry, the URL implicitly
|
||||
// points to
|
||||
// a specific chart and the Name field MUST NOT be used. The
|
||||
// RepoURL field is
|
||||
// required.
|
||||
repoURL: strings.MinRunes(1) & {
|
||||
=~"^(((https?)|(oci))://)([\\w\\d\\.\\-]+)(:[\\d]+)?(/.*)*$"
|
||||
}
|
||||
|
||||
// SemverConstraint specifies constraints on what new chart
|
||||
// versions are
|
||||
// permissible. This field is optional. When left unspecified,
|
||||
// there will be
|
||||
// no constraints, which means the latest version of the chart
|
||||
// will always be
|
||||
// used. Care should be taken with leaving this field unspecified,
|
||||
// as it can
|
||||
// lead to the unanticipated rollout of breaking changes.
|
||||
// More info:
|
||||
// https://github.com/masterminds/semver#checking-version-constraints
|
||||
semverConstraint?: string
|
||||
}
|
||||
|
||||
// Git describes a subscriptions to a Git repository.
|
||||
git?: {
|
||||
// AllowTags is a regular expression that can optionally be used
|
||||
// to limit the
|
||||
// tags that are considered in determining the newest commit of
|
||||
// interest. The
|
||||
// value in this field only has any effect when the
|
||||
// CommitSelectionStrategy is
|
||||
// Lexical, NewestTag, or SemVer. This field is optional.
|
||||
allowTags?: string
|
||||
|
||||
// Branch references a particular branch of the repository. The
|
||||
// value in this
|
||||
// field only has any effect when the CommitSelectionStrategy is
|
||||
// NewestFromBranch or left unspecified (which is implicitly the
|
||||
// same as
|
||||
// NewestFromBranch). This field is optional. When left
|
||||
// unspecified, (and the
|
||||
// CommitSelectionStrategy is NewestFromBranch or unspecified),
|
||||
// the
|
||||
// subscription is implicitly to the repository's default branch.
|
||||
branch?: strings.MinRunes(1) & {
|
||||
=~"^\\w+([-/]\\w+)*$"
|
||||
}
|
||||
|
||||
// CommitSelectionStrategy specifies the rules for how to identify
|
||||
// the newest
|
||||
// commit of interest in the repository specified by the RepoURL
|
||||
// field. This
|
||||
// field is optional. When left unspecified, the field is
|
||||
// implicitly treated
|
||||
// as if its value were "NewestFromBranch".
|
||||
commitSelectionStrategy?: "Lexical" | "NewestFromBranch" | "NewestTag" | "SemVer" | *"NewestFromBranch"
|
||||
|
||||
// DiscoveryLimit is an optional limit on the number of commits
|
||||
// that can be
|
||||
// discovered for this subscription. The limit is applied after
|
||||
// filtering
|
||||
// commits based on the AllowTags and IgnoreTags fields.
|
||||
// When left unspecified, the field is implicitly treated as if
|
||||
// its value
|
||||
// were "20". The upper limit for this field is 100.
|
||||
discoveryLimit?: int & <=100 & >=1 | *20
|
||||
|
||||
// ExcludePaths is a list of selectors that designate paths in the
|
||||
// repository
|
||||
// that should NOT trigger the production of new Freight when
|
||||
// changes are
|
||||
// detected therein. When specified, changes in the identified
|
||||
// paths will not
|
||||
// trigger Freight production. When not specified, paths that
|
||||
// should trigger
|
||||
// Freight production will be defined solely by IncludePaths.
|
||||
// Selectors may be
|
||||
// defined using:
|
||||
// 1. Exact paths to files or directories (ex. "charts/foo")
|
||||
// 2. Glob patterns (prefix the pattern with "glob:"; ex.
|
||||
// "glob:*.yaml")
|
||||
// 3. Regular expressions (prefix the pattern with "regex:" or
|
||||
// "regexp:";
|
||||
// ex. "regexp:^.*\.yaml$")
|
||||
// Paths selected by IncludePaths may be unselected by
|
||||
// ExcludePaths. This
|
||||
// is a useful method for including a broad set of paths and then
|
||||
// excluding a
|
||||
// subset of them.
|
||||
excludePaths?: [...string]
|
||||
|
||||
// IgnoreTags is a list of tags that must be ignored when
|
||||
// determining the
|
||||
// newest commit of interest. No regular expressions or glob
|
||||
// patterns are
|
||||
// supported yet. The value in this field only has any effect when
|
||||
// the
|
||||
// CommitSelectionStrategy is Lexical, NewestTag, or SemVer. This
|
||||
// field is
|
||||
// optional.
|
||||
ignoreTags?: [...string]
|
||||
|
||||
// IncludePaths is a list of selectors that designate paths in the
|
||||
// repository
|
||||
// that should trigger the production of new Freight when changes
|
||||
// are detected
|
||||
// therein. When specified, only changes in the identified paths
|
||||
// will trigger
|
||||
// Freight production. When not specified, changes in any path
|
||||
// will trigger
|
||||
// Freight production. Selectors may be defined using:
|
||||
// 1. Exact paths to files or directories (ex. "charts/foo")
|
||||
// 2. Glob patterns (prefix the pattern with "glob:"; ex.
|
||||
// "glob:*.yaml")
|
||||
// 3. Regular expressions (prefix the pattern with "regex:" or
|
||||
// "regexp:";
|
||||
// ex. "regexp:^.*\.yaml$")
|
||||
// Paths selected by IncludePaths may be unselected by
|
||||
// ExcludePaths. This
|
||||
// is a useful method for including a broad set of paths and then
|
||||
// excluding a
|
||||
// subset of them.
|
||||
includePaths?: [...string]
|
||||
|
||||
// InsecureSkipTLSVerify specifies whether certificate
|
||||
// verification errors
|
||||
// should be ignored when connecting to the repository. This
|
||||
// should be enabled
|
||||
// only with great caution.
|
||||
insecureSkipTLSVerify?: bool
|
||||
|
||||
// URL is the repository's URL. This is a required field.
|
||||
repoURL: strings.MinRunes(1) & {
|
||||
=~"(?:^(https?)://(?:([\\w-]+):(.+)@)?([\\w-]+(?:\\.[\\w-]+)*)(?::(\\d{1,5}))?(/.*)$)|(?:^([\\w-]+)@([\\w+]+(?:\\.[\\w-]+)*):(/?.*))"
|
||||
}
|
||||
|
||||
// SemverConstraint specifies constraints on what new tagged
|
||||
// commits are
|
||||
// considered in determining the newest commit of interest. The
|
||||
// value in this
|
||||
// field only has any effect when the CommitSelectionStrategy is
|
||||
// SemVer. This
|
||||
// field is optional. When left unspecified, there will be no
|
||||
// constraints,
|
||||
// which means the latest semantically tagged commit will always
|
||||
// be used. Care
|
||||
// should be taken with leaving this field unspecified, as it can
|
||||
// lead to the
|
||||
// unanticipated rollout of breaking changes.
|
||||
semverConstraint?: string
|
||||
|
||||
// StrictSemvers specifies whether only "strict" semver tags
|
||||
// should be
|
||||
// considered. A "strict" semver tag is one containing ALL of
|
||||
// major, minor,
|
||||
// and patch version components. This is enabled by default, but
|
||||
// only has any
|
||||
// effect when the CommitSelectionStrategy is SemVer. This should
|
||||
// be disabled
|
||||
// cautiously, as it creates the potential for any tag containing
|
||||
// numeric
|
||||
// characters only to be mistaken for a semver string containing
|
||||
// the major
|
||||
// version number only.
|
||||
strictSemvers: bool | *true
|
||||
}
|
||||
|
||||
// Image describes a subscription to container image repository.
|
||||
image?: {
|
||||
// AllowTags is a regular expression that can optionally be used
|
||||
// to limit the
|
||||
// image tags that are considered in determining the newest
|
||||
// version of an
|
||||
// image. This field is optional.
|
||||
allowTags?: string
|
||||
|
||||
// DiscoveryLimit is an optional limit on the number of image
|
||||
// references
|
||||
// that can be discovered for this subscription. The limit is
|
||||
// applied after
|
||||
// filtering images based on the AllowTags and IgnoreTags fields.
|
||||
// When left unspecified, the field is implicitly treated as if
|
||||
// its value
|
||||
// were "20". The upper limit for this field is 100.
|
||||
discoveryLimit?: int & <=100 & >=1 | *20
|
||||
|
||||
// GitRepoURL optionally specifies the URL of a Git repository
|
||||
// that contains
|
||||
// the source code for the image repository referenced by the
|
||||
// RepoURL field.
|
||||
// When this is specified, Kargo MAY be able to infer and link to
|
||||
// the exact
|
||||
// revision of that source code that was used to build the image.
|
||||
gitRepoURL?: =~"^https?://(\\w+([\\.-]\\w+)*@)?\\w+([\\.-]\\w+)*(:[\\d]+)?(/.*)?$"
|
||||
|
||||
// IgnoreTags is a list of tags that must be ignored when
|
||||
// determining the
|
||||
// newest version of an image. No regular expressions or glob
|
||||
// patterns are
|
||||
// supported yet. This field is optional.
|
||||
ignoreTags?: [...string]
|
||||
|
||||
// ImageSelectionStrategy specifies the rules for how to identify
|
||||
// the newest version
|
||||
// of the image specified by the RepoURL field. This field is
|
||||
// optional. When
|
||||
// left unspecified, the field is implicitly treated as if its
|
||||
// value were
|
||||
// "SemVer".
|
||||
imageSelectionStrategy?: "Digest" | "Lexical" | "NewestBuild" | "SemVer" | *"SemVer"
|
||||
|
||||
// InsecureSkipTLSVerify specifies whether certificate
|
||||
// verification errors
|
||||
// should be ignored when connecting to the repository. This
|
||||
// should be enabled
|
||||
// only with great caution.
|
||||
insecureSkipTLSVerify?: bool
|
||||
|
||||
// Platform is a string of the form <os>/<arch> that limits the
|
||||
// tags that can
|
||||
// be considered when searching for new versions of an image. This
|
||||
// field is
|
||||
// optional. When left unspecified, it is implicitly equivalent to
|
||||
// the
|
||||
// OS/architecture of the Kargo controller. Care should be taken
|
||||
// to set this
|
||||
// value correctly in cases where the image referenced by this
|
||||
// ImageRepositorySubscription will run on a Kubernetes node with
|
||||
// a different
|
||||
// OS/architecture than the Kargo controller. At present this is
|
||||
// uncommon, but
|
||||
// not unheard of.
|
||||
platform?: string
|
||||
|
||||
// RepoURL specifies the URL of the image repository to subscribe
|
||||
// to. The
|
||||
// value in this field MUST NOT include an image tag. This field
|
||||
// is required.
|
||||
repoURL: strings.MinRunes(1) & {
|
||||
=~"^(\\w+([\\.-]\\w+)*(:[\\d]+)?/)?(\\w+([\\.-]\\w+)*)(/\\w+([\\.-]\\w+)*)*$"
|
||||
}
|
||||
|
||||
// SemverConstraint specifies constraints on what new image
|
||||
// versions are
|
||||
// permissible. The value in this field only has any effect when
|
||||
// the
|
||||
// ImageSelectionStrategy is SemVer or left unspecified (which is
|
||||
// implicitly
|
||||
// the same as SemVer). This field is also optional. When left
|
||||
// unspecified,
|
||||
// (and the ImageSelectionStrategy is SemVer or unspecified),
|
||||
// there will be no
|
||||
// constraints, which means the latest semantically tagged version
|
||||
// of an image
|
||||
// will always be used. Care should be taken with leaving this
|
||||
// field
|
||||
// unspecified, as it can lead to the unanticipated rollout of
|
||||
// breaking
|
||||
// changes. Refer to Image Updater documentation for more details.
|
||||
// More info:
|
||||
// https://github.com/masterminds/semver#checking-version-constraints
|
||||
semverConstraint?: string
|
||||
|
||||
// StrictSemvers specifies whether only "strict" semver tags
|
||||
// should be
|
||||
// considered. A "strict" semver tag is one containing ALL of
|
||||
// major, minor,
|
||||
// and patch version components. This is enabled by default, but
|
||||
// only has any
|
||||
// effect when the ImageSelectionStrategy is SemVer. This should
|
||||
// be disabled
|
||||
// cautiously, as it is not uncommon to tag container images with
|
||||
// short Git
|
||||
// commit hashes, which have the potential to contain numeric
|
||||
// characters only
|
||||
// and could be mistaken for a semver string containing the major
|
||||
// version
|
||||
// number only.
|
||||
strictSemvers: bool | *true
|
||||
}
|
||||
}] & [_, ...]
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
module: "user.holos.run/platform"
|
||||
language: version: "v0.9.2"
|
||||
module: "example.com/platform"
|
||||
language: version: "v0.11.0"
|
||||
|
||||
@@ -1 +1 @@
|
||||
5
|
||||
6
|
||||
|
||||
Reference in New Issue
Block a user