Compare commits

...

2 Commits

Author SHA1 Message Date
Jeff McCune
7845ce62e0 (#178) Update buf with make tools
Previously go releaser was failing because buf has been updated again.
2024-06-03 11:10:42 -07:00
Jeff McCune
a1542752b7 (#178) Add ArgoCD Application resources for each build plan
Previously holos render platform ./platform did not render any GitOps
resources for Flux or ArgoCD.

This patch uses the new DeployFiles field in holos v0.83.0 to write an
Application resource for every component BuildPlan listed in the
platform.
2024-06-03 10:33:05 -07:00
16 changed files with 132 additions and 62 deletions

View File

@@ -18,7 +18,7 @@
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/router": "^17.3.0",
"@bufbuild/protobuf": "^1.9.0",
"@bufbuild/protobuf": "^1.10.0",
"@connectrpc/connect": "^1.4.0",
"@connectrpc/connect-query": "^1.4.1",
"@connectrpc/connect-web": "^1.4.0",
@@ -37,8 +37,8 @@
"@angular-eslint/template-parser": "17.3.0",
"@angular/cli": "^17.3.4",
"@angular/compiler-cli": "^17.3.0",
"@bufbuild/buf": "^1.32.1",
"@bufbuild/protoc-gen-es": "^1.9.0",
"@bufbuild/buf": "^1.32.2",
"@bufbuild/protoc-gen-es": "^1.10.0",
"@connectrpc/protoc-gen-connect-es": "^1.4.0",
"@connectrpc/protoc-gen-connect-query": "^1.4.1",
"@ngx-formly/schematics": "^6.3.0",
@@ -2494,9 +2494,9 @@
}
},
"node_modules/@bufbuild/buf": {
"version": "1.32.1",
"resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.32.1.tgz",
"integrity": "sha512-uPVhqDzYtz9Q7WTodCschf9xXKL5/TQHtU1fKOUmain/dGe66YtSU4LQ0SWmxAQEJIUSmkH4UOPgKEzNMKdWeg==",
"version": "1.32.2",
"resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.32.2.tgz",
"integrity": "sha512-WL2mpou8k9EBo2US0KyZhFSHrDmRZvv5ZMp7lywUFb+3lW1+E/OZnBaBYTrSAb9vfzSmwdRsSOJwKdDpfbjdSg==",
"dev": true,
"hasInstallScript": true,
"bin": {
@@ -2508,18 +2508,18 @@
"node": ">=12"
},
"optionalDependencies": {
"@bufbuild/buf-darwin-arm64": "1.32.1",
"@bufbuild/buf-darwin-x64": "1.32.1",
"@bufbuild/buf-linux-aarch64": "1.32.1",
"@bufbuild/buf-linux-x64": "1.32.1",
"@bufbuild/buf-win32-arm64": "1.32.1",
"@bufbuild/buf-win32-x64": "1.32.1"
"@bufbuild/buf-darwin-arm64": "1.32.2",
"@bufbuild/buf-darwin-x64": "1.32.2",
"@bufbuild/buf-linux-aarch64": "1.32.2",
"@bufbuild/buf-linux-x64": "1.32.2",
"@bufbuild/buf-win32-arm64": "1.32.2",
"@bufbuild/buf-win32-x64": "1.32.2"
}
},
"node_modules/@bufbuild/buf-darwin-arm64": {
"version": "1.32.1",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.32.1.tgz",
"integrity": "sha512-Duw4StB5sth8s4cQfOa7Be6+OAXfGuuo3ZOkUzJTxWOVH0sWq0nTkO90kXMJOjOkmB/JMnqRQcVAdKuu9u1pcw==",
"version": "1.32.2",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.32.2.tgz",
"integrity": "sha512-AR6WlhY6CmLlZetvYzLjbyVpU5jM4eDd3PRTUAK5NcpqIPdCMiMK9nc33Yxc8pO04Lv4yrYdzWnFqZdbCzsS2g==",
"cpu": [
"arm64"
],
@@ -2533,9 +2533,9 @@
}
},
"node_modules/@bufbuild/buf-darwin-x64": {
"version": "1.32.1",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.32.1.tgz",
"integrity": "sha512-3ANVbOoSmfdFxhOvjMDLTr2u35+mdEQcF9Tx39ZEA+Las0WucV6n/bGPwucpH04a9UsW59npNt3IzA4VvUDcyw==",
"version": "1.32.2",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.32.2.tgz",
"integrity": "sha512-ZmVYsMcS06KHZYy4DmKf95BnDWji5/xo42oybqjtlE/wPGKNpqgiq0UGHSlK0oCh67sybHidXVci6LC95xHNrw==",
"cpu": [
"x64"
],
@@ -2549,9 +2549,9 @@
}
},
"node_modules/@bufbuild/buf-linux-aarch64": {
"version": "1.32.1",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.32.1.tgz",
"integrity": "sha512-QdGirTSFU/WzI/lBo9ph4ThQJS9S8Zm3l/7hg+07GrF57VqB1pUZvnh2298R10/kLKP6lpMtqeVrjMhIcHtxTw==",
"version": "1.32.2",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.32.2.tgz",
"integrity": "sha512-OG509xwJHjuzSn5nNrVWghW/RpB76Ovhj7LCKi52QVh/qQq6VUXeQk42XIWjXY/Cmzmg81G7t97kLw27JLzH0w==",
"cpu": [
"arm64"
],
@@ -2565,9 +2565,9 @@
}
},
"node_modules/@bufbuild/buf-linux-x64": {
"version": "1.32.1",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.32.1.tgz",
"integrity": "sha512-6R8whslj+6WQi9nUjVkNx6AW64czFOFD22dLmrB4i3bY/WDku+/5CNHBU/On738pmgujQrEVT4ztB6fVmVtKOg==",
"version": "1.32.2",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.32.2.tgz",
"integrity": "sha512-TFNN87nhLyGFUKOy3beU/0GZk7TEs57J5VQczSq83rHLC+7t1nDuk5Rew8QEyV0OzEzZF+BkpLZj0jY+dWg6/g==",
"cpu": [
"x64"
],
@@ -2581,9 +2581,9 @@
}
},
"node_modules/@bufbuild/buf-win32-arm64": {
"version": "1.32.1",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.32.1.tgz",
"integrity": "sha512-QPDxdLRxJpiCTEx7/5bIN3V3EPGvZ1+dyEco6d1qIydDrH9BbCWNy9YLPJOaDxAbewW4lrAX73FmMTTM4tNtbw==",
"version": "1.32.2",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.32.2.tgz",
"integrity": "sha512-SsGUfILZblPNbCgG6W9DxzCdfHnT2YTYQEkCS877DL1wkWMlMJ/ijZA9Cg2fx8NrLKzFTKC1nlTfqRBcLPf2Mg==",
"cpu": [
"arm64"
],
@@ -2597,9 +2597,9 @@
}
},
"node_modules/@bufbuild/buf-win32-x64": {
"version": "1.32.1",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.32.1.tgz",
"integrity": "sha512-rZSM5id3zko+YQICZB3ypj+AVL0rcN7gra8SN4Ep4aOWAH6gib3RgH51cFcq9VgI1N1xTBy8wZvQMnMLPBn2zg==",
"version": "1.32.2",
"resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.32.2.tgz",
"integrity": "sha512-FXOHmXB0kxQ7nQ0JYWpByl6/ebkKwWPPjucOHIDcfo7czg5ZD/fRusb738YJ1qeN+5RXybkvhJIrewxVnhYuhg==",
"cpu": [
"x64"
],
@@ -2613,18 +2613,18 @@
}
},
"node_modules/@bufbuild/protobuf": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.9.0.tgz",
"integrity": "sha512-W7gp8Q/v1NlCZLsv8pQ3Y0uCu/SHgXOVFK+eUluUKWXmsb6VHkpNx0apdOWWcDbB9sJoKeP8uPrjmehJz6xETQ=="
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.0.tgz",
"integrity": "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag=="
},
"node_modules/@bufbuild/protoc-gen-es": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.9.0.tgz",
"integrity": "sha512-LJy1nC3Jsfdhs9v48P7qF6YXIqh+usFhXSVzJDTmw0yKjxQ3CKBNISRtaMql/g9hb1MLRU6unHCcFfdz4HSO/Q==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.10.0.tgz",
"integrity": "sha512-zBYBsVT/ul4uZb6F+kD7/k4sWNHVVbEPfJwKi0FDr+9VJo8MKIofI6pkr5ksBLr4fi/74r+e/75Xi/0clL5dXg==",
"dev": true,
"dependencies": {
"@bufbuild/protobuf": "^1.9.0",
"@bufbuild/protoplugin": "1.9.0"
"@bufbuild/protobuf": "^1.10.0",
"@bufbuild/protoplugin": "1.10.0"
},
"bin": {
"protoc-gen-es": "bin/protoc-gen-es"
@@ -2633,7 +2633,7 @@
"node": ">=14"
},
"peerDependencies": {
"@bufbuild/protobuf": "1.9.0"
"@bufbuild/protobuf": "1.10.0"
},
"peerDependenciesMeta": {
"@bufbuild/protobuf": {
@@ -2642,12 +2642,12 @@
}
},
"node_modules/@bufbuild/protoplugin": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-1.9.0.tgz",
"integrity": "sha512-/mxMiGs5h78RUHT7v4+mv0Wt0gyRf/SOS5PLzKEg2sclEAlFPbXfZ8HjlvxJpXZP/YpP3HvsW/mil3E69G0mXg==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-1.10.0.tgz",
"integrity": "sha512-u6NE4vL0lw1+EK4/PiE/SQB7fKO4LRJNTEScIXVOi2x88K/c8WKc/k0KyEaA0asVBMpwekJQZGnRyj04ZtN5Gg==",
"dev": true,
"dependencies": {
"@bufbuild/protobuf": "1.9.0",
"@bufbuild/protobuf": "1.10.0",
"@typescript/vfs": "^1.4.0",
"typescript": "4.5.2"
}

View File

@@ -21,7 +21,7 @@
"@angular/platform-browser": "^17.3.0",
"@angular/platform-browser-dynamic": "^17.3.0",
"@angular/router": "^17.3.0",
"@bufbuild/protobuf": "^1.9.0",
"@bufbuild/protobuf": "^1.10.0",
"@connectrpc/connect": "^1.4.0",
"@connectrpc/connect-query": "^1.4.1",
"@connectrpc/connect-web": "^1.4.0",
@@ -40,8 +40,8 @@
"@angular-eslint/template-parser": "17.3.0",
"@angular/cli": "^17.3.4",
"@angular/compiler-cli": "^17.3.0",
"@bufbuild/buf": "^1.32.1",
"@bufbuild/protoc-gen-es": "^1.9.0",
"@bufbuild/buf": "^1.32.2",
"@bufbuild/protoc-gen-es": "^1.10.0",
"@connectrpc/protoc-gen-connect-es": "^1.4.0",
"@connectrpc/protoc-gen-connect-query": "^1.4.1",
"@ngx-formly/schematics": "^6.3.0",

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/object/v1alpha1/object.proto (package holos.object.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/organization/v1alpha1/organization.proto (package holos.organization.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/organization/v1alpha1/organization_service.proto (package holos.organization.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/platform/v1alpha1/platform.proto (package holos.platform.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/platform/v1alpha1/platform_service.proto (package holos.platform.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/storage/v1alpha1/storage.proto (package holos.storage.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/system/v1alpha1/system.proto (package holos.system.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/system/v1alpha1/system_service.proto (package holos.system.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/user/v1alpha1/user.proto (package holos.user.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.9.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
// @generated from file holos/user/v1alpha1/user_service.proto (package holos.user.v1alpha1, syntax proto3)
/* eslint-disable */
// @ts-nocheck

View File

@@ -26,6 +26,8 @@ import (
es "external-secrets.io/externalsecret/v1beta1"
pc "postgres-operator.crunchydata.com/postgrescluster/v1beta1"
app "argoproj.io/application/v1alpha1"
)
// #Resources represents kubernetes api objects output along side a build plan.
@@ -146,7 +148,8 @@ import (
KustomizeResources: [FileName=string]: {...}
// output represents the build plan provided to the holos cli.
Output: v1.#BuildPlan & {
Output: #BuildPlan & {
metadata: name: Name
spec: components: helmChartList: [Chart]
}
}
@@ -161,7 +164,8 @@ import (
}
// output represents the build plan provided to the holos cli.
Output: v1.#BuildPlan & {
Output: #BuildPlan & {
metadata: name: Name
spec: components: kustomizeBuildList: [Kustomization]
}
}
@@ -175,7 +179,8 @@ import (
Resources: #Resources
// output represents the build plan provided to the holos cli.
Output: v1.#BuildPlan & {
Output: #BuildPlan & {
metadata: name: Name
// resources is a map unlike other build plans which use a list.
spec: components: resources: "\(Name)": {
metadata: name: Name
@@ -183,3 +188,32 @@ import (
}
}
}
#BuildPlan: v1.#BuildPlan & {
metadata: name: string
// Render the ArgoCD Application
spec: deployFiles: (#Argo & {ComponentName: metadata.name}).deployFiles
}
// #ArgoApplication represents an argocd Application resource for each
// component, written using the #HolosComponent.deployFiles field.
#Argo: {
ComponentName: string
Application: app.#Application & {
metadata: name: ComponentName
metadata: namespace: "argocd"
spec: {
destination: server: "https://kubernetes.default.svc"
project: "default"
source: {
path: "\(_Platform.Model.argocd.deployRoot)/deploy/clusters/\(_ClusterName)/components/\(ComponentName)"
repoURL: _Platform.Model.argocd.repoURL
targetRevision: _Platform.Model.argocd.targetRevision
}
}
}
// deployFiles represents the output files to write along side the component.
deployFiles: "clusters/\(_ClusterName)/gitops/\(ComponentName).application.gen.yaml": yaml.Marshal(Application)
}

View File

@@ -267,9 +267,45 @@ let FormBuilder = v1.#FormBuilder & {
Sections: argocd: {
displayName: "ArgoCD"
description: "Enter configuration values from the ArgoCD application in the Holos Platform project in ZITADEL."
description: "Configure ArgoCD platform settings."
fieldConfigs: clientID: (#StandardFields & {DisplayName: displayName}).clientID
fieldConfigs: {
clientID: (#StandardFields & {DisplayName: displayName}).clientID
repoURL: {
type: "input"
props: {
label: "Git repository URL"
description: "Git repository URL, e.g. 'git@github.com:myorg/holos-infra.git'"
minLength: 3
maxLength: 128
required: true
}
validation: messages: {
minLength: "Must be at least \(props.minLength) characters"
maxLength: "Must be at most \(props.maxLength) characters"
}
}
deployRoot: {
type: "input"
defaultValue: ""
props: {
label: "Deploy Root"
description: "Path to the parent directory of the holos deploy directory."
required: false
}
}
targetRevision: {
type: "input"
defaultValue: "HEAD"
props: {
label: "Target Revision"
description: "Git reference to deploy."
required: true
}
}
}
}
}

View File

@@ -1 +1 @@
0
1