mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-22 15:41:47 +00:00
use flux filename instead of gotk
Signed-off-by: Rémy Léone <rleone@scaleway.com>
This commit is contained in:
parent
1730f3c46b
commit
7e52163c63
11 changed files with 32 additions and 32 deletions
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
|
|
@ -136,7 +136,7 @@ jobs:
|
|||
mkdir -p ./ghcr.io/flux-system
|
||||
flux install --registry=ghcr.io/fluxcd \
|
||||
--components-extra=image-reflector-controller,image-automation-controller \
|
||||
--export > ./ghcr.io/flux-system/gotk-components.yaml
|
||||
--export > ./ghcr.io/flux-system/flux-components.yaml
|
||||
|
||||
cd ./ghcr.io && flux push artifact \
|
||||
oci://ghcr.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }} \
|
||||
|
|
@ -148,7 +148,7 @@ jobs:
|
|||
mkdir -p ./docker.io/flux-system
|
||||
flux install --registry=docker.io/fluxcd \
|
||||
--components-extra=image-reflector-controller,image-automation-controller \
|
||||
--export > ./docker.io/flux-system/gotk-components.yaml
|
||||
--export > ./docker.io/flux-system/flux-components.yaml
|
||||
|
||||
cd ./docker.io && flux push artifact \
|
||||
oci://docker.io/fluxcd/flux-manifests:${{ steps.prep.outputs.version }} \
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ func createTenantCmdRun(cmd *cobra.Command, args []string) error {
|
|||
{
|
||||
APIGroup: "rbac.authorization.k8s.io",
|
||||
Kind: "User",
|
||||
Name: fmt.Sprintf("gotk:%s:reconciler", ns),
|
||||
Name: fmt.Sprintf("flux:%s:reconciler", ns),
|
||||
},
|
||||
{
|
||||
Kind: "ServiceAccount",
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ type statusable interface {
|
|||
|
||||
// oldConditions represents the deprecated API which is sunsetting.
|
||||
type oldConditions interface {
|
||||
// this is usually implemented by GOTK API objects because it's used by pkg/apis/meta
|
||||
// this is usually implemented by flux API objects because it's used by pkg/apis/meta
|
||||
GetStatusConditions() *[]metav1.Condition
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ data:
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "count(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"True\",kind=~\"Kustomization|HelmRelease\"})\n-\nsum(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"Deleted\",kind=~\"Kustomization|HelmRelease\"})",
|
||||
"expr": "count(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"True\",kind=~\"Kustomization|HelmRelease\"})\n-\nsum(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"Deleted\",kind=~\"Kustomization|HelmRelease\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "count(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"True\",kind=~\"Kustomization|HelmRelease\"})\n-\nsum(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"Deleted\",kind=~\"Kustomization|HelmRelease\"})",
|
||||
"expr": "count(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"True\",kind=~\"Kustomization|HelmRelease\"})\n-\nsum(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"Deleted\",kind=~\"Kustomization|HelmRelease\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "count(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"True\",kind=~\"Kustomization|HelmRelease\"})\n-\nsum(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"Deleted\",kind=~\"Kustomization|HelmRelease\"})",
|
||||
"expr": "count(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"True\",kind=~\"Kustomization|HelmRelease\"})\n-\nsum(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"Deleted\",kind=~\"Kustomization|HelmRelease\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
|
|
@ -142,7 +142,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "sum(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"False\",kind=~\"Kustomization|HelmRelease\"})",
|
||||
"expr": "sum(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"False\",kind=~\"Kustomization|HelmRelease\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
|
|
@ -203,7 +203,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "count(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"True\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"})\n-\nsum(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"Deleted\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"})",
|
||||
"expr": "count(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"True\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"})\n-\nsum(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"Deleted\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "sum(gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"False\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"})",
|
||||
"expr": "sum(flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"False\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"})",
|
||||
"interval": "",
|
||||
"legendFormat": "",
|
||||
"refId": "A"
|
||||
|
|
@ -324,7 +324,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)",
|
||||
"expr": "sum(rate(flux_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)\n/\n sum(rate(flux_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)",
|
||||
"interval": "",
|
||||
"legendFormat": "{{kind}}",
|
||||
"refId": "A"
|
||||
|
|
@ -388,7 +388,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}[5m])) by (kind)",
|
||||
"expr": "sum(rate(flux_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}[5m])) by (kind)\n/\n sum(rate(flux_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}[5m])) by (kind)",
|
||||
"interval": "",
|
||||
"legendFormat": "{{kind}}",
|
||||
"refId": "A"
|
||||
|
|
@ -496,7 +496,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"False\",kind=~\"Kustomization|HelmRelease\"}",
|
||||
"expr": "flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"False\",kind=~\"Kustomization|HelmRelease\"}",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
|
|
@ -624,7 +624,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "gotk_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"False\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}",
|
||||
"expr": "flux_reconcile_condition{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",type=\"Ready\",status=\"False\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"interval": "",
|
||||
|
|
@ -735,7 +735,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)",
|
||||
"expr": "sum(rate(flux_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)\n/\n sum(rate(flux_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "{{kind}}/{{name}}",
|
||||
|
|
@ -835,7 +835,7 @@
|
|||
"targets": [
|
||||
{
|
||||
"exemplar": true,
|
||||
"expr": "sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)",
|
||||
"expr": "sum(rate(flux_reconcile_duration_seconds_sum{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)\n/\n sum(rate(flux_reconcile_duration_seconds_count{namespace=~\"$operator_namespace\",exported_namespace=~\"$namespace\",kind=~\"GitRepository|OCIRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)",
|
||||
"hide": false,
|
||||
"interval": "",
|
||||
"legendFormat": "{{kind}}/{{name}}",
|
||||
|
|
@ -904,7 +904,7 @@
|
|||
]
|
||||
},
|
||||
"datasource": "$DS_PROMETHEUS",
|
||||
"definition": "label_values(gotk_reconcile_condition, namespace)",
|
||||
"definition": "label_values(flux_reconcile_condition, namespace)",
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 0,
|
||||
|
|
@ -914,7 +914,7 @@
|
|||
"name": "operator_namespace",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(gotk_reconcile_condition, namespace)",
|
||||
"query": "label_values(flux_reconcile_condition, namespace)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 2,
|
||||
|
|
@ -940,7 +940,7 @@
|
|||
]
|
||||
},
|
||||
"datasource": "$DS_PROMETHEUS",
|
||||
"definition": "label_values(gotk_reconcile_condition, exported_namespace)",
|
||||
"definition": "label_values(flux_reconcile_condition, exported_namespace)",
|
||||
"description": null,
|
||||
"error": null,
|
||||
"hide": 0,
|
||||
|
|
@ -950,7 +950,7 @@
|
|||
"name": "namespace",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "label_values(gotk_reconcile_condition, exported_namespace)",
|
||||
"query": "label_values(flux_reconcile_condition, exported_namespace)",
|
||||
"refId": "StandardVariableQuery"
|
||||
},
|
||||
"refresh": 2,
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ func MakeDefaultOptions() Options {
|
|||
LogLevel: "info",
|
||||
BaseURL: "https://github.com/fluxcd/flux2/releases",
|
||||
NotificationController: "notification-controller",
|
||||
ManifestFile: "gotk-components.yaml",
|
||||
ManifestFile: "flux-components.yaml",
|
||||
Timeout: time.Minute,
|
||||
TargetPath: "",
|
||||
ClusterDomain: "cluster.local",
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ func MakeDefaultOptions() Options {
|
|||
Namespace: "flux-system",
|
||||
Branch: "main",
|
||||
Secret: "flux-system",
|
||||
ManifestFile: "gotk-sync.yaml",
|
||||
ManifestFile: "flux-sync.yaml",
|
||||
TargetPath: "",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,8 +142,8 @@ Apply a `kustomize` patch which prevents the use of HTTP connections:
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- gotk-components.yaml
|
||||
- gotk-sync.yaml
|
||||
- flux-components.yaml
|
||||
- flux-sync.yaml
|
||||
patches:
|
||||
- patch: |
|
||||
- op: add
|
||||
|
|
|
|||
|
|
@ -143,8 +143,8 @@ func installFlux(ctx context.Context, kubeClient client.Client, kubeconfigPath,
|
|||
|
||||
kustomizeYaml := `
|
||||
resources:
|
||||
- gotk-components.yaml
|
||||
- gotk-sync.yaml
|
||||
- flux-components.yaml
|
||||
- flux-sync.yaml
|
||||
patchesStrategicMerge:
|
||||
- |-
|
||||
apiVersion: apps/v1
|
||||
|
|
@ -178,8 +178,8 @@ patchesStrategicMerge:
|
|||
|
||||
files := make(map[string]io.Reader)
|
||||
files["clusters/e2e/flux-system/kustomization.yaml"] = strings.NewReader(kustomizeYaml)
|
||||
files["clusters/e2e/flux-system/gotk-components.yaml"] = strings.NewReader("")
|
||||
files["clusters/e2e/flux-system/gotk-sync.yaml"] = strings.NewReader("")
|
||||
files["clusters/e2e/flux-system/flux-components.yaml"] = strings.NewReader("")
|
||||
files["clusters/e2e/flux-system/flux-sync.yaml"] = strings.NewReader("")
|
||||
err = commitAndPushAll(repo, files, defaultBranch)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error committing and pushing manifests: %w", err)
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ import (
|
|||
|
||||
func main() {
|
||||
ks := "test-cluster/flux-system/kustomization.yaml"
|
||||
patchName := "test-cluster/flux-system/gotk-patches.yaml"
|
||||
patchName := "test-cluster/flux-system/flux-patches.yaml"
|
||||
ksContent := `apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- gotk-components.yaml
|
||||
- gotk-sync.yaml
|
||||
- flux-components.yaml
|
||||
- flux-sync.yaml
|
||||
patches:
|
||||
- path: gotk-patches.yaml
|
||||
- path: flux-patches.yaml
|
||||
target:
|
||||
kind: Deployment`
|
||||
patchContent := `apiVersion: apps/v1
|
||||
|
|
|
|||
Loading…
Reference in a new issue