mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 09:38:49 +01:00
Compare commits
26 Commits
master
...
v2.5.0-rc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba4c562508 | ||
|
|
701b3403c5 | ||
|
|
f927aaeddd | ||
|
|
e0ffec8a63 | ||
|
|
a04d634fba | ||
|
|
0b076c13a0 | ||
|
|
d33981ffa2 | ||
|
|
2b62aa7d92 | ||
|
|
dfbcf757b9 | ||
|
|
d5feafc654 | ||
|
|
f47a5f90c2 | ||
|
|
faa01bb6f9 | ||
|
|
1e1a744604 | ||
|
|
aca9ed2030 | ||
|
|
b83554fca8 | ||
|
|
3275337a26 | ||
|
|
89b6fe01a6 | ||
|
|
1fe1a0060b | ||
|
|
de72cb1686 | ||
|
|
2e24cdc7ea | ||
|
|
ebf367497b | ||
|
|
277c6adaf1 | ||
|
|
20ce840a2d | ||
|
|
20776419d8 | ||
|
|
2bf51f401d | ||
|
|
6a4468ce6b |
6
.github/workflows/ci-build.yaml
vendored
6
.github/workflows/ci-build.yaml
vendored
@@ -18,6 +18,9 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-go:
|
||||
name: Ensure Go modules synchronicity
|
||||
@@ -59,6 +62,9 @@ jobs:
|
||||
run: make build-local
|
||||
|
||||
lint-go:
|
||||
permissions:
|
||||
contents: read # for actions/checkout to fetch code
|
||||
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
|
||||
name: Lint Go code
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
|
||||
7
.github/workflows/codeql.yml
vendored
7
.github/workflows/codeql.yml
vendored
@@ -13,8 +13,15 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
permissions:
|
||||
actions: read # for github/codeql-action/init to get workflow details
|
||||
contents: read # for actions/checkout to fetch code
|
||||
security-events: write # for github/codeql-action/autobuild to send a status report
|
||||
if: github.repository == 'argoproj/argo-cd'
|
||||
|
||||
# CodeQL runs on ubuntu-latest and windows-latest
|
||||
|
||||
5
.github/workflows/image.yaml
vendored
5
.github/workflows/image.yaml
vendored
@@ -16,8 +16,13 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
permissions:
|
||||
contents: write # for git to push upgrade commit if not already deployed
|
||||
if: github.repository == 'argoproj/argo-cd'
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
|
||||
8
.github/workflows/release.yaml
vendored
8
.github/workflows/release.yaml
vendored
@@ -14,8 +14,13 @@ on:
|
||||
env:
|
||||
GOLANG_VERSION: '1.18'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prepare-release:
|
||||
permissions:
|
||||
contents: write # To push changes to release branch
|
||||
name: Perform automatic release on trigger ${{ github.ref }}
|
||||
if: github.repository == 'argoproj/argo-cd'
|
||||
runs-on: ubuntu-22.04
|
||||
@@ -274,7 +279,8 @@ jobs:
|
||||
tag_name: ${{ env.RELEASE_TAG }}
|
||||
draft: ${{ env.DRAFT_RELEASE }}
|
||||
prerelease: ${{ env.PRE_RELEASE }}
|
||||
body: ${{ steps.release-notes.outputs.content }}
|
||||
generate_release_notes: true
|
||||
body: ${{ steps.release-notes.outputs.content }} # Pre-pended to the generated notes
|
||||
files: |
|
||||
dist/argocd-*
|
||||
/tmp/sbom.tar.gz
|
||||
|
||||
6
.github/workflows/update-snyk.yaml
vendored
6
.github/workflows/update-snyk.yaml
vendored
@@ -2,8 +2,14 @@ name: Snyk report update
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # midnight every Sunday
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
snyk-report:
|
||||
permissions:
|
||||
contents: write # To push snyk reports
|
||||
if: github.repository == 'argoproj/argo-cd'
|
||||
name: Update Snyk report in the docs directory
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/go-logr/logr"
|
||||
log "github.com/sirupsen/logrus"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
apierr "k8s.io/apimachinery/pkg/api/errors"
|
||||
@@ -62,7 +61,6 @@ var (
|
||||
// ApplicationSetReconciler reconciles a ApplicationSet object
|
||||
type ApplicationSetReconciler struct {
|
||||
client.Client
|
||||
Log logr.Logger
|
||||
Scheme *runtime.Scheme
|
||||
Recorder record.EventRecorder
|
||||
Generators map[string]generators.Generator
|
||||
@@ -77,15 +75,14 @@ type ApplicationSetReconciler struct {
|
||||
// +kubebuilder:rbac:groups=argoproj.io,resources=applicationsets/status,verbs=get;update;patch
|
||||
|
||||
func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
|
||||
_ = r.Log.WithValues("applicationset", req.NamespacedName)
|
||||
_ = log.WithField("applicationset", req.NamespacedName)
|
||||
logCtx := log.WithField("applicationset", req.NamespacedName)
|
||||
|
||||
var applicationSetInfo argov1alpha1.ApplicationSet
|
||||
parametersGenerated := false
|
||||
|
||||
if err := r.Get(ctx, req.NamespacedName, &applicationSetInfo); err != nil {
|
||||
if client.IgnoreNotFound(err) != nil {
|
||||
log.WithError(err).Infof("unable to get ApplicationSet: '%v' ", err)
|
||||
logCtx.WithError(err).Infof("unable to get ApplicationSet: '%v' ", err)
|
||||
}
|
||||
return ctrl.Result{}, client.IgnoreNotFound(err)
|
||||
}
|
||||
@@ -123,7 +120,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
||||
//
|
||||
// Changes to watched resources will cause this to be reconciled sooner than
|
||||
// the RequeueAfter time.
|
||||
log.Errorf("error occurred during application validation: %s", err.Error())
|
||||
logCtx.Errorf("error occurred during application validation: %s", err.Error())
|
||||
|
||||
_ = r.setApplicationSetStatusCondition(ctx,
|
||||
&applicationSetInfo,
|
||||
@@ -148,7 +145,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
||||
var message string
|
||||
for _, v := range validateErrors {
|
||||
message = v.Error()
|
||||
log.Errorf("validation error found during application validation: %s", message)
|
||||
logCtx.Errorf("validation error found during application validation: %s", message)
|
||||
}
|
||||
if len(validateErrors) > 1 {
|
||||
// Only the last message gets added to the appset status, to keep the size reasonable.
|
||||
@@ -215,7 +212,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
||||
delete(applicationSetInfo.Annotations, common.AnnotationApplicationSetRefresh)
|
||||
err := r.Client.Update(ctx, &applicationSetInfo)
|
||||
if err != nil {
|
||||
log.Warnf("error occurred while updating ApplicationSet: %v", err)
|
||||
logCtx.Warnf("error occurred while updating ApplicationSet: %v", err)
|
||||
_ = r.setApplicationSetStatusCondition(ctx,
|
||||
&applicationSetInfo,
|
||||
argov1alpha1.ApplicationSetCondition{
|
||||
@@ -230,7 +227,7 @@ func (r *ApplicationSetReconciler) Reconcile(ctx context.Context, req ctrl.Reque
|
||||
}
|
||||
|
||||
requeueAfter := r.getMinRequeueAfter(&applicationSetInfo)
|
||||
log.WithField("requeueAfter", requeueAfter).Info("end reconcile")
|
||||
logCtx.WithField("requeueAfter", requeueAfter).Info("end reconcile")
|
||||
|
||||
if len(validateErrors) == 0 {
|
||||
if err := r.setApplicationSetStatusCondition(ctx,
|
||||
|
||||
@@ -1832,7 +1832,6 @@ func TestReconcilerValidationErrorBehaviour(t *testing.T) {
|
||||
}}, nil)
|
||||
|
||||
r := ApplicationSetReconciler{
|
||||
Log: ctrl.Log.WithName("controllers").WithName("ApplicationSet"),
|
||||
Client: client,
|
||||
Scheme: scheme,
|
||||
Renderer: &utils.Render{},
|
||||
@@ -1908,7 +1907,6 @@ func TestSetApplicationSetStatusCondition(t *testing.T) {
|
||||
client := fake.NewClientBuilder().WithScheme(scheme).WithObjects(&appSet).Build()
|
||||
|
||||
r := ApplicationSetReconciler{
|
||||
Log: ctrl.Log.WithName("controllers").WithName("ApplicationSet"),
|
||||
Client: client,
|
||||
Scheme: scheme,
|
||||
Renderer: &utils.Render{},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#namePrefix: kustomize-
|
||||
|
||||
resources:
|
||||
- namespace-install.yaml
|
||||
- https://github.com/argoproj/argo-workflows/releases/download/v3.4.0/namespace-install.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
@@ -1,417 +0,0 @@
|
||||
# This is an auto-generated file. DO NOT EDIT
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: clusterworkflowtemplates.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: ClusterWorkflowTemplate
|
||||
listKind: ClusterWorkflowTemplateList
|
||||
plural: clusterworkflowtemplates
|
||||
shortNames:
|
||||
- clusterwftmpl
|
||||
- cwft
|
||||
singular: clusterworkflowtemplate
|
||||
scope: Cluster
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: cronworkflows.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: CronWorkflow
|
||||
listKind: CronWorkflowList
|
||||
plural: cronworkflows
|
||||
shortNames:
|
||||
- cwf
|
||||
- cronwf
|
||||
singular: cronworkflow
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: workfloweventbindings.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: WorkflowEventBinding
|
||||
listKind: WorkflowEventBindingList
|
||||
plural: workfloweventbindings
|
||||
shortNames:
|
||||
- wfeb
|
||||
singular: workfloweventbinding
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: workflows.argoproj.io
|
||||
spec:
|
||||
additionalPrinterColumns:
|
||||
- JSONPath: .status.phase
|
||||
description: Status of the workflow
|
||||
name: Status
|
||||
type: string
|
||||
- JSONPath: .status.startedAt
|
||||
description: When the workflow was started
|
||||
format: date-time
|
||||
name: Age
|
||||
type: date
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: Workflow
|
||||
listKind: WorkflowList
|
||||
plural: workflows
|
||||
shortNames:
|
||||
- wf
|
||||
singular: workflow
|
||||
scope: Namespaced
|
||||
subresources: {}
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: workflowtemplates.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: WorkflowTemplate
|
||||
listKind: WorkflowTemplateList
|
||||
plural: workflowtemplates
|
||||
shortNames:
|
||||
- wftmpl
|
||||
singular: workflowtemplate
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: argo
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: argo-server
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: argo-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/exec
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- workflows
|
||||
- workflows/finalizers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- create
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- workflowtemplates
|
||||
- workflowtemplates/finalizers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- cronworkflows
|
||||
- cronworkflows/finalizers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- policy
|
||||
resources:
|
||||
- poddisruptionbudgets
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- delete
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: argo-server-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/exec
|
||||
- pods/log
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- watch
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- workflows
|
||||
- workfloweventbindings
|
||||
- workflowtemplates
|
||||
- cronworkflows
|
||||
- cronworkflows/finalizers
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: argo-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: argo-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: argo
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: argo-server-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: argo-server-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: argo-server
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: workflow-controller-configmap
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: argo-server
|
||||
spec:
|
||||
ports:
|
||||
- name: web
|
||||
port: 2746
|
||||
targetPort: 2746
|
||||
selector:
|
||||
app: argo-server
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: workflow-controller-metrics
|
||||
spec:
|
||||
ports:
|
||||
- name: metrics
|
||||
port: 9090
|
||||
protocol: TCP
|
||||
targetPort: 9090
|
||||
selector:
|
||||
app: workflow-controller
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: argo-server
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: argo-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: argo-server
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- server
|
||||
- --namespaced
|
||||
image: argoproj/argocli:v2.12.5
|
||||
name: argo-server
|
||||
ports:
|
||||
- containerPort: 2746
|
||||
name: web
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 2746
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
volumeMounts:
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
serviceAccountName: argo-server
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: tmp
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: workflow-controller
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: workflow-controller
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: workflow-controller
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- --configmap
|
||||
- workflow-controller-configmap
|
||||
- --executor-image
|
||||
- argoproj/argoexec:v2.12.5
|
||||
- --namespaced
|
||||
command:
|
||||
- workflow-controller
|
||||
image: argoproj/workflow-controller:v2.12.5
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
name: workflow-controller
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
name: metrics
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
serviceAccountName: argo
|
||||
@@ -11,4 +11,4 @@ version: 0.1.0
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: "1.0"
|
||||
appVersion: "1.0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
dependencies:
|
||||
- name: kube-prometheus-stack
|
||||
version: 9.4.10
|
||||
version: 40.5.0
|
||||
repository: https://prometheus-community.github.io/helm-charts
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#namePrefix: kustomize-
|
||||
|
||||
resources:
|
||||
- namespace-install.yaml
|
||||
- https://github.com/argoproj/argo-workflows/releases/download/v3.4.0/namespace-install.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
@@ -1,417 +0,0 @@
|
||||
# This is an auto-generated file. DO NOT EDIT
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: clusterworkflowtemplates.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: ClusterWorkflowTemplate
|
||||
listKind: ClusterWorkflowTemplateList
|
||||
plural: clusterworkflowtemplates
|
||||
shortNames:
|
||||
- clusterwftmpl
|
||||
- cwft
|
||||
singular: clusterworkflowtemplate
|
||||
scope: Cluster
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: cronworkflows.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: CronWorkflow
|
||||
listKind: CronWorkflowList
|
||||
plural: cronworkflows
|
||||
shortNames:
|
||||
- cwf
|
||||
- cronwf
|
||||
singular: cronworkflow
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: workfloweventbindings.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: WorkflowEventBinding
|
||||
listKind: WorkflowEventBindingList
|
||||
plural: workfloweventbindings
|
||||
shortNames:
|
||||
- wfeb
|
||||
singular: workfloweventbinding
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: workflows.argoproj.io
|
||||
spec:
|
||||
additionalPrinterColumns:
|
||||
- JSONPath: .status.phase
|
||||
description: Status of the workflow
|
||||
name: Status
|
||||
type: string
|
||||
- JSONPath: .status.startedAt
|
||||
description: When the workflow was started
|
||||
format: date-time
|
||||
name: Age
|
||||
type: date
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: Workflow
|
||||
listKind: WorkflowList
|
||||
plural: workflows
|
||||
shortNames:
|
||||
- wf
|
||||
singular: workflow
|
||||
scope: Namespaced
|
||||
subresources: {}
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: workflowtemplates.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: WorkflowTemplate
|
||||
listKind: WorkflowTemplateList
|
||||
plural: workflowtemplates
|
||||
shortNames:
|
||||
- wftmpl
|
||||
singular: workflowtemplate
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
storage: true
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: argo
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: argo-server
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: argo-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/exec
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- workflows
|
||||
- workflows/finalizers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- create
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- workflowtemplates
|
||||
- workflowtemplates/finalizers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- cronworkflows
|
||||
- cronworkflows/finalizers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- policy
|
||||
resources:
|
||||
- poddisruptionbudgets
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- delete
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: argo-server-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/exec
|
||||
- pods/log
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- watch
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- workflows
|
||||
- workfloweventbindings
|
||||
- workflowtemplates
|
||||
- cronworkflows
|
||||
- cronworkflows/finalizers
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: argo-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: argo-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: argo
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: argo-server-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: argo-server-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: argo-server
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: workflow-controller-configmap
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: argo-server
|
||||
spec:
|
||||
ports:
|
||||
- name: web
|
||||
port: 2746
|
||||
targetPort: 2746
|
||||
selector:
|
||||
app: argo-server
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: workflow-controller-metrics
|
||||
spec:
|
||||
ports:
|
||||
- name: metrics
|
||||
port: 9090
|
||||
protocol: TCP
|
||||
targetPort: 9090
|
||||
selector:
|
||||
app: workflow-controller
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: argo-server
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: argo-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: argo-server
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- server
|
||||
- --namespaced
|
||||
image: argoproj/argocli:v2.12.5
|
||||
name: argo-server
|
||||
ports:
|
||||
- containerPort: 2746
|
||||
name: web
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 2746
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
volumeMounts:
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
serviceAccountName: argo-server
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: tmp
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: workflow-controller
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: workflow-controller
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: workflow-controller
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- --configmap
|
||||
- workflow-controller-configmap
|
||||
- --executor-image
|
||||
- argoproj/argoexec:v2.12.5
|
||||
- --namespaced
|
||||
command:
|
||||
- workflow-controller
|
||||
image: argoproj/workflow-controller:v2.12.5
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: metrics
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
name: workflow-controller
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
name: metrics
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
serviceAccountName: argo
|
||||
@@ -1 +1,14 @@
|
||||
apiVersion: v2
|
||||
name: helm-prometheus-operator
|
||||
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: "1.0"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
dependencies:
|
||||
- name: kube-prometheus-stack
|
||||
version: 9.4.10
|
||||
version: 40.5.0
|
||||
repository: https://prometheus-community.github.io/helm-charts
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: cluster-addons
|
||||
namespace: argocd
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://github.com/argoproj/argo-cd.git
|
||||
revision: HEAD
|
||||
directories:
|
||||
- path: applicationset/examples/git-generator-directory/excludes/cluster-addons/*
|
||||
- exclude: true
|
||||
path: applicationset/examples/git-generator-directory/excludes/cluster-addons/exclude-helm-guestbook
|
||||
template:
|
||||
metadata:
|
||||
name: '{{path.basename}}'
|
||||
spec:
|
||||
project: "my-project"
|
||||
source:
|
||||
repoURL: https://github.com/argoproj/argo-cd.git
|
||||
targetRevision: HEAD
|
||||
path: '{{path}}'
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: '{{path.basename}}'
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
@@ -2,7 +2,9 @@ apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: cluster-addons
|
||||
namespace: argocd
|
||||
spec:
|
||||
goTemplate: true
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://github.com/argoproj/argo-cd.git
|
||||
@@ -15,7 +17,7 @@ spec:
|
||||
metadata:
|
||||
name: '{{.path.basename}}'
|
||||
spec:
|
||||
project: default
|
||||
project: "my-project"
|
||||
source:
|
||||
repoURL: https://github.com/argoproj/argo-cd.git
|
||||
targetRevision: HEAD
|
||||
@@ -23,3 +25,6 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: '{{.path.basename}}'
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: cluster-addons
|
||||
namespace: argocd
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
@@ -13,7 +14,7 @@ spec:
|
||||
metadata:
|
||||
name: '{{path.basename}}'
|
||||
spec:
|
||||
project: default
|
||||
project: "my-project"
|
||||
source:
|
||||
repoURL: https://github.com/argoproj/argo-cd.git
|
||||
targetRevision: HEAD
|
||||
@@ -21,3 +22,6 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: '{{path.basename}}'
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: cluster-addons
|
||||
namespace: argocd
|
||||
spec:
|
||||
goTemplate: true
|
||||
generators:
|
||||
@@ -14,7 +15,7 @@ spec:
|
||||
metadata:
|
||||
name: '{{.path.basename}}'
|
||||
spec:
|
||||
project: default
|
||||
project: "my-project"
|
||||
source:
|
||||
repoURL: https://github.com/argoproj/argo-cd.git
|
||||
targetRevision: HEAD
|
||||
@@ -22,3 +23,6 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: '{{.path.basename}}'
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/argoproj/pkg/stats"
|
||||
@@ -16,6 +15,7 @@ import (
|
||||
"github.com/argoproj/argo-cd/v2/applicationset/generators"
|
||||
"github.com/argoproj/argo-cd/v2/applicationset/utils"
|
||||
"github.com/argoproj/argo-cd/v2/applicationset/webhook"
|
||||
cmdutil "github.com/argoproj/argo-cd/v2/cmd/util"
|
||||
"github.com/argoproj/argo-cd/v2/common"
|
||||
"github.com/argoproj/argo-cd/v2/reposerver/askpass"
|
||||
"github.com/argoproj/argo-cd/v2/util/env"
|
||||
@@ -56,8 +56,6 @@ func NewCommand() *cobra.Command {
|
||||
policy string
|
||||
debugLog bool
|
||||
dryRun bool
|
||||
logFormat string
|
||||
logLevel string
|
||||
)
|
||||
scheme := runtime.NewScheme()
|
||||
_ = clientgoscheme.AddToScheme(scheme)
|
||||
@@ -79,6 +77,9 @@ func NewCommand() *cobra.Command {
|
||||
},
|
||||
)
|
||||
|
||||
cli.SetLogFormat(cmdutil.LogFormat)
|
||||
cli.SetLogLevel(cmdutil.LogLevel)
|
||||
|
||||
restConfig, err := clientConfig.ClientConfig()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -86,21 +87,6 @@ func NewCommand() *cobra.Command {
|
||||
|
||||
restConfig.UserAgent = fmt.Sprintf("argocd-applicationset-controller/%s (%s)", vers.Version, vers.Platform)
|
||||
|
||||
level, err := log.ParseLevel(logLevel)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.SetLevel(level)
|
||||
switch strings.ToLower(logFormat) {
|
||||
case "json":
|
||||
log.SetFormatter(&log.JSONFormatter{})
|
||||
case "text":
|
||||
if os.Getenv("FORCE_LOG_COLORS") == "1" {
|
||||
log.SetFormatter(&log.TextFormatter{ForceColors: true})
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("Unknown log format '%s'", logFormat)
|
||||
}
|
||||
policyObj, exists := utils.Policies[policy]
|
||||
if !exists {
|
||||
log.Info("Policy value can be: sync, create-only, create-update")
|
||||
@@ -184,7 +170,6 @@ func NewCommand() *cobra.Command {
|
||||
if err = (&controllers.ApplicationSetReconciler{
|
||||
Generators: topLevelGenerators,
|
||||
Client: mgr.GetClient(),
|
||||
Log: ctrl.Log.WithName("controllers").WithName("ApplicationSet"),
|
||||
Scheme: mgr.GetScheme(),
|
||||
Recorder: mgr.GetEventRecorderFor("applicationset-controller"),
|
||||
Renderer: &utils.Render{},
|
||||
@@ -217,9 +202,9 @@ func NewCommand() *cobra.Command {
|
||||
command.Flags().StringVar(&argocdRepoServer, "argocd-repo-server", "argocd-repo-server:8081", "Argo CD repo server address")
|
||||
command.Flags().StringVar(&policy, "policy", "sync", "Modify how application is synced between the generator and the cluster. Default is 'sync' (create & update & delete), options: 'create-only', 'create-update' (no deletion)")
|
||||
command.Flags().BoolVar(&debugLog, "debug", false, "Print debug logs. Takes precedence over loglevel")
|
||||
command.Flags().StringVar(&logLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
|
||||
command.Flags().StringVar(&cmdutil.LogFormat, "logformat", "text", "Set the logging format. One of: text|json")
|
||||
command.Flags().StringVar(&cmdutil.LogLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
|
||||
command.Flags().BoolVar(&dryRun, "dry-run", false, "Enable dry run mode")
|
||||
command.Flags().StringVar(&logFormat, "logformat", "text", "Set the logging format. One of: text|json")
|
||||
return &command
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@ type PluginConfigSpec struct {
|
||||
Init Command `json:"init,omitempty"`
|
||||
Generate Command `json:"generate"`
|
||||
Discover Discover `json:"discover"`
|
||||
AllowConcurrency bool `json:"allowConcurrency"`
|
||||
LockRepo bool `json:"lockRepo"`
|
||||
}
|
||||
|
||||
//Discover holds find and fileName
|
||||
|
||||
@@ -11,5 +11,3 @@ spec:
|
||||
discover:
|
||||
find:
|
||||
glob: "**/*/main.jsonnet"
|
||||
allowConcurrency: false
|
||||
lockRepo: false
|
||||
@@ -12,5 +12,3 @@ spec:
|
||||
find:
|
||||
command: [sh, -c, find . -name kustomization.yaml]
|
||||
glob: "**/*/kustomization.yaml"
|
||||
allowConcurrency: true
|
||||
lockRepo: false
|
||||
@@ -12,5 +12,3 @@ spec:
|
||||
find:
|
||||
command: [sh, -c, find . -name kustomization.yaml]
|
||||
glob: "**/*/kustomization.yaml"
|
||||
allowConcurrency: true
|
||||
lockRepo: false
|
||||
@@ -11,15 +11,6 @@ $ curl $ARGOCD_SERVER/api/v1/session -d $'{"username":"admin","password":"passwo
|
||||
{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1Njc4MTIzODcsImlzcyI6ImFyZ29jZCIsIm5iZiI6MTU2NzgxMjM4Nywic3ViIjoiYWRtaW4ifQ.ejyTgFxLhuY9mOBtKhcnvobg3QZXJ4_RusN_KIdVwao"}
|
||||
```
|
||||
|
||||
> <=v1.2
|
||||
|
||||
Then pass using the HTTP `SetCookie` header, prefixing with `argocd.token`:
|
||||
|
||||
```bash
|
||||
$ curl $ARGOCD_SERVER/api/v1/applications --cookie "argocd.token=$ARGOCD_TOKEN"
|
||||
{"metadata":{"selfLink":"/apis/argoproj.io/v1alpha1/namespaces/argocd/applications","resourceVersion":"37755"},"items":...}
|
||||
```
|
||||
|
||||
Then pass using the HTTP `Authorization` header, prefixing with `Bearer `:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -81,11 +81,6 @@ might decide to refresh `stable` repo. As workaround override
|
||||
|
||||
```yaml
|
||||
data:
|
||||
# v1.2 or earlier use `helm.repositories`
|
||||
helm.repositories: |
|
||||
- url: http://<internal-helm-repo-host>:8080
|
||||
name: stable
|
||||
# v1.3 or later use `repositories` with `type: helm`
|
||||
repositories: |
|
||||
- type: helm
|
||||
url: http://<internal-helm-repo-host>:8080
|
||||
|
||||
@@ -45,7 +45,7 @@ spec:
|
||||
- path: applicationset/examples/git-generator-directory/cluster-addons/*
|
||||
template:
|
||||
metadata:
|
||||
name: '{{path[0]}}'
|
||||
name: '{{path.basename}}'
|
||||
spec:
|
||||
project: "my-project"
|
||||
source:
|
||||
@@ -55,6 +55,9 @@ spec:
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: '{{path.basename}}'
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
```
|
||||
(*The full example can be found [here](https://github.com/argoproj/argo-cd/tree/master/applicationset/examples/git-generator-directory).*)
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ number of allowed concurrent kubectl fork/execs.
|
||||
* The controller uses Kubernetes watch APIs to maintain lightweight Kubernetes cluster cache. This allows to avoid querying Kubernetes during app reconciliation and significantly improve
|
||||
performance. For performance reasons controller monitors and caches only preferred the version of a resource. During reconciliation, the controller might have to convert cached resource from
|
||||
preferred version into a version of the resource stored in Git. If `kubectl convert` fails because conversion is not supported then controller falls back to Kubernetes API query which slows down
|
||||
reconciliation. In this case advice user-preferred resource version in Git.
|
||||
reconciliation. In this case, we advise you to use the preferred resource version in Git.
|
||||
|
||||
* The controller polls Git every 3m by default. You can increase this duration using `timeout.reconciliation` setting in the `argocd-cm` ConfigMap. The value of `timeout.reconciliation` is a duration string e.g `60s`, `1m`, `1h` or `1d`.
|
||||
|
||||
@@ -126,20 +126,17 @@ If the manifest generation has no side effects then requests are processed in pa
|
||||
|
||||
### Webhook and Manifest Paths Annotation
|
||||
|
||||
Argo CD aggressively caches generated manifests and uses repository commit SHA as a cache key. A new commit to the Git repository invalidates cache for all applications configured in the repository
|
||||
that again negatively affect mono repositories with multiple applications. You might use [webhooks ⧉](https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/webhook.md) and `argocd.argoproj.io/manifest-generate-paths` Application
|
||||
CRD annotation to solve this problem and improve performance.
|
||||
Argo CD aggressively caches generated manifests and uses the repository commit SHA as a cache key. A new commit to the Git repository invalidates the cache for all applications configured in the repository.
|
||||
This can negatively affect repositories with multiple applications. You can use [webhooks](https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/webhook.md) and the `argocd.argoproj.io/manifest-generate-paths` Application CRD annotation to solve this problem and improve performance.
|
||||
|
||||
The `argocd.argoproj.io/manifest-generate-paths` contains a semicolon-separated list of paths within the Git repository that are used during manifest generation. The webhook compares paths specified in the annotation
|
||||
with the changed files specified in the webhook payload. If non of the changed files are located in the paths then webhook don't trigger application reconciliation and re-uses previously generated manifests cache for a new commit.
|
||||
The `argocd.argoproj.io/manifest-generate-paths` annotation contains a semicolon-separated list of paths within the Git repository that are used during manifest generation. The webhook compares paths specified in the annotation with the changed files specified in the webhook payload. If no modified files match the paths specified in `argocd.argoproj.io/manifest-generate-paths`, then the webhook will not trigger application reconciliation and the existing cache will be considered valid for the new commit.
|
||||
|
||||
Installations that use a different repo for each app are **not** subject to this behavior and will likely get no benefit from using these annotations.
|
||||
Installations that use a different repository for each application are **not** subject to this behavior and will likely get no benefit from using these annotations.
|
||||
|
||||
!!! note
|
||||
Application manifest paths annotation support depends on the git provider used for the Application. It is currently only supported for GitHub, GitLab, and Gogs based repos
|
||||
I'm using `.Second()` modifier to avoid distracting users who already rely on `--app-resync` flag.
|
||||
Application manifest paths annotation support depends on the git provider used for the Application. It is currently only supported for GitHub, GitLab, and Gogs based repos.
|
||||
|
||||
* **Relative path** The annotation might contains relative path. In this case the path is considered relative to the path specified in the application source:
|
||||
* **Relative path** The annotation might contain a relative path. In this case the path is considered relative to the path specified in the application source:
|
||||
|
||||
```yaml
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
@@ -157,7 +154,8 @@ spec:
|
||||
path: guestbook
|
||||
# ...
|
||||
```
|
||||
* **Absolute path** The annotation value might be an absolute path started from '/'. In this case path is considered as an absolute path within the Git repository:
|
||||
|
||||
* **Absolute path** The annotation value might be an absolute path starting with '/'. In this case path is considered as an absolute path within the Git repository:
|
||||
|
||||
```yaml
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
|
||||
@@ -46,7 +46,7 @@ subresources of an application.
|
||||
#### The `action` action
|
||||
|
||||
The `action` action corresponds to either built-in resource customizations defined
|
||||
[in the Argo CD repository](https://github.com/argoproj/argo-cd/search?q=filename%3Aaction.lua+path%3Aresource_customizations),
|
||||
[in the Argo CD repository](https://github.com/argoproj/argo-cd/tree/master/resource_customizations),
|
||||
or to [custom resource actions](resource_actions.md#custom-resource-actions) defined by you.
|
||||
The `action` path is of the form `action/<api-group>/<Kind>/<action-name>`. For
|
||||
example, a resource customization path
|
||||
|
||||
@@ -168,7 +168,6 @@ spec:
|
||||
check:
|
||||
- command: [-f ./main.ts]
|
||||
glob: "main.ts"
|
||||
allowConcurrency: true # enables generating multiple manifests in parallel.
|
||||
```
|
||||
|
||||
#### Config Management Plugin API Server (cmp-server)
|
||||
@@ -320,6 +319,5 @@ spec:
|
||||
check:
|
||||
- command: [-f ./main.ts]
|
||||
glob: "main.ts"
|
||||
allowConcurrency: true # enables generating multiple manifests in parallel.
|
||||
```
|
||||
2. Something magically patches the relevant manifest to add the sidecar.
|
||||
|
||||
@@ -34,11 +34,6 @@ or UI:
|
||||
|
||||
1. Click `Connect` to test the connection and have the repository added
|
||||
|
||||
> earlier than v1.2
|
||||
|
||||
1. Navigate to `Settings/Repositories`
|
||||
1. Click `Connect Repo` button and enter HTTPS credentials
|
||||
|
||||

|
||||
|
||||
#### Access Token
|
||||
@@ -109,14 +104,6 @@ Using the UI:
|
||||
!!!note
|
||||
When your SSH repository is served from a non-standard port, you have to use `ssh://`-style URLs to specify your repository. The scp-style `git@yourgit.com:yourrepo` URLs do **not** support port specification, and will treat any port number as part of the repository's path.
|
||||
|
||||
> earlier than v1.2
|
||||
|
||||
The Argo CD UI don't support configuring SSH credentials. The SSH credentials can only be configured using the Argo CD CLI:
|
||||
|
||||
```
|
||||
argocd repo add git@github.com:argoproj/argocd-example-apps.git --ssh-private-key-path ~/.ssh/id_rsa
|
||||
```
|
||||
|
||||
### GitHub App Credential
|
||||
|
||||
Private repositories that are hosted on GitHub.com or GitHub Enterprise can be accessed using credentials from a GitHub Application. Consult the [GitHub documentation](https://docs.github.com/en/developers/apps/about-apps#about-github-apps) on how to create an application.
|
||||
@@ -268,12 +255,6 @@ It is possible to add and remove TLS certificates using the ArgoCD web UI:
|
||||
You can also manage TLS certificates in a declarative, self-managed ArgoCD setup. All TLS certificates are stored in the ConfigMap object `argocd-tls-cert-cm`.
|
||||
Please refer to the [Operator Manual](../../operator-manual/declarative-setup/#repositories-using-self-signed-tls-certificates-or-are-signed-by-custom-ca) for more information.
|
||||
|
||||
> Before v1.2
|
||||
|
||||
We do not currently have first-class support for this. See [#1513](https://github.com/argoproj/argo-cd/issues/1513).
|
||||
|
||||
As a work-around, you can customize your Argo CD image. See [#1344](https://github.com/argoproj/argo-cd/issues/1344#issuecomment-479811810)
|
||||
|
||||
## Unknown SSH Hosts
|
||||
|
||||
If you are using a privately hosted Git service over SSH, then you have the following options:
|
||||
@@ -351,28 +332,7 @@ It is possible to add and remove SSH known hosts entries using the ArgoCD web UI
|
||||
|
||||
### Managing SSH known hosts data using declarative setup
|
||||
|
||||
You can also manage SSH known hosts entries in a declarative, self-managed ArgoCD setup. All SSH public host keys are stored in the ConfigMap object `argocd-ssh-known-hosts-cm`. For more details, please refer to the [Operator Manual](../../operator-manual/declarative-setup/#ssh-known-host-public-keys)
|
||||
|
||||
> Before v1.2
|
||||
|
||||
|
||||
(1) You can customize the Argo CD Docker image by adding the host's SSH public key to `/etc/ssh/ssh_known_hosts`. Additional entries to this file can be generated using the `ssh-keyscan` utility (e.g. `ssh-keyscan your-private-git-server.com`. For more information see [example](https://github.com/argoproj/argo-cd/tree/master/examples/known-hosts) which demonstrates how `/etc/ssh/ssh_known_hosts` can be customized.
|
||||
|
||||
!!! note
|
||||
The `/etc/ssh/ssh_known_hosts` should include Git host on each Argo CD deployment as well as on a computer where `argocd repo add` is executed. After resolving issue
|
||||
[#1514](https://github.com/argoproj/argo-cd/issues/1514) only `argocd-repo-server` deployment has to be customized.
|
||||
|
||||
(1) Add repository using Argo CD CLI and `--insecure-ignore-host-key` flag:
|
||||
|
||||
```bash
|
||||
argocd repo add git@github.com:argoproj/argocd-example-apps.git --ssh-private-key-path ~/.ssh/id_rsa --insecure-ignore-host-key
|
||||
```
|
||||
|
||||
!!! warning "Don't use in production"
|
||||
The `--insecure-ignore-host-key` should not be used in production as this is subject to man-in-the-middle attacks.
|
||||
|
||||
!!! warning "This does not work for Kustomize remote bases or custom plugins"
|
||||
For Kustomize support, see [#827](https://github.com/argoproj/argo-cd/issues/827).
|
||||
You can also manage SSH known hosts entries in a declarative, self-managed ArgoCD setup. All SSH public host keys are stored in the ConfigMap object `argocd-ssh-known-hosts-cm`. For more details, please refer to the [Operator Manual](../operator-manual/declarative-setup.md#ssh-known-host-public-keys).
|
||||
|
||||
## Git Submodules
|
||||
|
||||
@@ -380,5 +340,5 @@ Submodules are supported and will be picked up automatically. If the submodule r
|
||||
|
||||
## Declarative Configuration
|
||||
|
||||
See [declarative setup](../../operator-manual/declarative-setup#repositories)
|
||||
See [declarative setup](../operator-manual/declarative-setup.md#repositories)
|
||||
|
||||
|
||||
@@ -25,12 +25,10 @@ The sync-status panel shows that pruning was skipped, and why:
|
||||
|
||||

|
||||
|
||||
The app will be out of sync if ArgoCD expects a resource to be pruned. You may wish to use this along with [compare options](compare-options.md).
|
||||
The app will be out of sync if Argo CD expects a resource to be pruned. You may wish to use this along with [compare options](compare-options.md).
|
||||
|
||||
## Disable Kubectl Validation
|
||||
|
||||
>v1.2
|
||||
|
||||
For a certain class of objects, it is necessary to `kubectl apply` them using the `--validate=false` flag. Examples of this are kubernetes types which uses `RawExtension`, such as [ServiceCatalog](https://github.com/kubernetes-incubator/service-catalog/blob/master/pkg/apis/servicecatalog/v1beta1/types.go#L497). You can do using this annotations:
|
||||
|
||||
|
||||
@@ -44,13 +42,11 @@ If you want to exclude a whole class of objects globally, consider setting `reso
|
||||
|
||||
## Skip Dry Run for new custom resources types
|
||||
|
||||
>v1.6
|
||||
|
||||
When syncing a custom resource which is not yet known to the cluster, there are generally two options:
|
||||
|
||||
1) The CRD manifest is part of the same sync. Then ArgoCD will automatically skip the dry run, the CRD will be applied and the resource can be created.
|
||||
1) The CRD manifest is part of the same sync. Then Argo CD will automatically skip the dry run, the CRD will be applied and the resource can be created.
|
||||
2) In some cases the CRD is not part of the sync, but it could be created in another way, e.g. by a controller in the cluster. An example is [gatekeeper](https://github.com/open-policy-agent/gatekeeper),
|
||||
which creates CRDs in response to user defined `ConstraintTemplates`. ArgoCD cannot find the CRD in the sync and will fail with the error `the server could not find the requested resource`.
|
||||
which creates CRDs in response to user defined `ConstraintTemplates`. Argo CD cannot find the CRD in the sync and will fail with the error `the server could not find the requested resource`.
|
||||
|
||||
To skip the dry run for missing resource types, use the following annotation:
|
||||
|
||||
@@ -64,7 +60,7 @@ The dry run will still be executed if the CRD is already present in the cluster.
|
||||
|
||||
## Selective Sync
|
||||
|
||||
Currently when syncing using auto sync ArgoCD applies every object in the application.
|
||||
Currently when syncing using auto sync Argo CD applies every object in the application.
|
||||
For applications containing thousands of objects this takes quite a long time and puts undue pressure on the api server.
|
||||
Turning on selective sync option which will sync only out-of-sync resources.
|
||||
|
||||
@@ -129,7 +125,7 @@ metadata:
|
||||
|
||||
## Replace Resource Instead Of Applying Changes
|
||||
|
||||
By default, ArgoCD executes `kubectl apply` operation to apply the configuration stored in Git. In some cases
|
||||
By default, Argo CD executes `kubectl apply` operation to apply the configuration stored in Git. In some cases
|
||||
`kubectl apply` is not suitable. For example, resource spec might be too big and won't fit into
|
||||
`kubectl.kubernetes.io/last-applied-configuration` annotation that is added by `kubectl apply`. In such cases you
|
||||
might use `Replace=true` sync option:
|
||||
@@ -144,7 +140,7 @@ spec:
|
||||
- Replace=true
|
||||
```
|
||||
|
||||
If the `Replace=true` sync option is set the ArgoCD will use `kubectl replace` or `kubectl create` command to apply changes.
|
||||
If the `Replace=true` sync option is set the Argo CD will use `kubectl replace` or `kubectl create` command to apply changes.
|
||||
|
||||
This can also be configured at individual resource level.
|
||||
```yaml
|
||||
@@ -155,10 +151,25 @@ metadata:
|
||||
|
||||
## Server-Side Apply
|
||||
|
||||
By default, ArgoCD executes `kubectl apply` operation to apply the configuration stored in Git. This is a client
|
||||
side operation that relies on `kubectl.kubernetes.io/last-applied-configuration` annotation to store the previous
|
||||
resource state. In some cases the resource is too big to fit in 262144 bytes allowed annotation size. In this case
|
||||
server-side apply can be used to avoid this issue as the annotation is not used in this case.
|
||||
This option enables Kubernetes
|
||||
[Server-Side Apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/).
|
||||
|
||||
By default, Argo CD executes `kubectl apply` operation to apply the configuration stored in Git.
|
||||
This is a client side operation that relies on `kubectl.kubernetes.io/last-applied-configuration`
|
||||
annotation to store the previous resource state.
|
||||
|
||||
However, there are some cases where you want to use `kubectl apply --server-side` over `kubectl apply`:
|
||||
|
||||
- Resource is too big to fit in 262144 bytes allowed annotation size. In this case
|
||||
server-side apply can be used to avoid this issue as the annotation is not used in this case.
|
||||
- Patching of existing resources on the cluster that are not fully managed by Argo CD.
|
||||
- Use a more declarative approach, which tracks a user's field management, rather than a user's last
|
||||
applied state.
|
||||
|
||||
If `ServerSideApply=true` sync option is set, Argo CD will use `kubectl apply --server-side`
|
||||
command to apply changes.
|
||||
|
||||
It can be enabled at the application level like in the example below:
|
||||
|
||||
```yaml
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
@@ -169,20 +180,50 @@ spec:
|
||||
- ServerSideApply=true
|
||||
```
|
||||
|
||||
If the `ServerSideApply=true` sync option is set the ArgoCD will use `kubectl apply --server-side` command to apply changes.
|
||||
To enable ServerSideApply just for an individual resource, the sync-option annotation
|
||||
can be used:
|
||||
|
||||
This can also be configured at individual resource level.
|
||||
```yaml
|
||||
metadata:
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-options: ServerSideApply=true
|
||||
```
|
||||
|
||||
ServerSideApply can also be used to patch existing resources by providing a partial
|
||||
yaml. For example, if there is a requirement to update just the number of replicas
|
||||
in a given Deployment, the following yaml can be provided to Argo CD:
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: my-deployment
|
||||
spec:
|
||||
replicas: 3
|
||||
```
|
||||
|
||||
Note that by the Deployment schema specification, this isn't a valid manifest. In this
|
||||
case an additional sync option *must* be provided to skip schema validation. The example
|
||||
below shows how to configure the application to enable the two necessary sync options:
|
||||
|
||||
```yaml
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
spec:
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- ServerSideApply=true
|
||||
- Validate=false
|
||||
```
|
||||
|
||||
In this case, Argo CD will use `kubectl apply --server-side --validate=false` command
|
||||
to apply changes.
|
||||
|
||||
Note: [`Replace=true`](#replace-resource-instead-of-applying-changes) takes precedence over `ServerSideApply=true`.
|
||||
|
||||
## Fail the sync if a shared resource is found
|
||||
|
||||
By default, ArgoCD will apply all manifests found in the git path configured in the Application regardless if the resources defined in the yamls are already applied by another Application. If the `FailOnSharedResource` sync option is set, ArgoCD will fail the sync whenever it finds a resource in the current Application that is already applied in the cluster by another Application.
|
||||
By default, Argo CD will apply all manifests found in the git path configured in the Application regardless if the resources defined in the yamls are already applied by another Application. If the `FailOnSharedResource` sync option is set, Argo CD will fail the sync whenever it finds a resource in the current Application that is already applied in the cluster by another Application.
|
||||
|
||||
```yaml
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
@@ -195,7 +236,7 @@ spec:
|
||||
|
||||
## Respect ignore difference configs
|
||||
|
||||
This sync option is used to enable ArgoCD to consider the configurations made in the `spec.ignoreDifferences` attribute also during the sync stage. By default, ArgoCD uses the `ignoreDifferences` config just for computing the diff between the live and desired state which defines if the application is synced or not. However during the sync stage, the desired state is applied as-is. The patch is calculated using a 3-way-merge between the live state the desired state and the `last-applied-configuration` annotation. This sometimes leads to an undesired results. This behavior can be changed by setting the `RespectIgnoreDifferences=true` sync option like in the example bellow:
|
||||
This sync option is used to enable Argo CD to consider the configurations made in the `spec.ignoreDifferences` attribute also during the sync stage. By default, Argo CD uses the `ignoreDifferences` config just for computing the diff between the live and desired state which defines if the application is synced or not. However during the sync stage, the desired state is applied as-is. The patch is calculated using a 3-way-merge between the live state the desired state and the `last-applied-configuration` annotation. This sometimes leads to an undesired results. This behavior can be changed by setting the `RespectIgnoreDifferences=true` sync option like in the example bellow:
|
||||
|
||||
```yaml
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
@@ -213,7 +254,7 @@ spec:
|
||||
- RespectIgnoreDifferences=true
|
||||
```
|
||||
|
||||
The example above shows how an ArgoCD Application can be configured so it will ignore the `spec.replicas` field from the desired state (git) during the sync stage. This is achieve by calculating and pre-patching the desired state before applying it in the cluster. Note that the `RespectIgnoreDifferences` sync option is only effective when the resource is already created in the cluster. If the Application is being created and no live state exists, the desired state is applied as-is.
|
||||
The example above shows how an Argo CD Application can be configured so it will ignore the `spec.replicas` field from the desired state (git) during the sync stage. This is achieve by calculating and pre-patching the desired state before applying it in the cluster. Note that the `RespectIgnoreDifferences` sync option is only effective when the resource is already created in the cluster. If the Application is being created and no live state exists, the desired state is applied as-is.
|
||||
|
||||
## Create Namespace
|
||||
|
||||
|
||||
@@ -17,8 +17,9 @@ import (
|
||||
|
||||
var (
|
||||
kindToCRDPath = map[string]string{
|
||||
application.ApplicationFullName: "manifests/crds/application-crd.yaml",
|
||||
application.AppProjectFullName: "manifests/crds/appproject-crd.yaml",
|
||||
application.ApplicationFullName: "manifests/crds/application-crd.yaml",
|
||||
application.AppProjectFullName: "manifests/crds/appproject-crd.yaml",
|
||||
application.ApplicationSetFullName: "manifests/crds/applicationset-crd.yaml",
|
||||
}
|
||||
)
|
||||
|
||||
@@ -54,7 +55,7 @@ func getCustomResourceDefinitions() map[string]*extensionsobj.CustomResourceDefi
|
||||
removeValidation(un, "status")
|
||||
}
|
||||
|
||||
crd := toCRD(un)
|
||||
crd := toCRD(un, un.GetName() == "applicationsets.argoproj.io")
|
||||
crd.Labels = map[string]string{
|
||||
"app.kubernetes.io/name": crd.Name,
|
||||
"app.kubernetes.io/part-of": "argocd",
|
||||
@@ -81,7 +82,10 @@ func removeValidation(un *unstructured.Unstructured, path string) {
|
||||
unstructured.RemoveNestedField(un.Object, schemaPath...)
|
||||
}
|
||||
|
||||
func toCRD(un *unstructured.Unstructured) *extensionsobj.CustomResourceDefinition {
|
||||
func toCRD(un *unstructured.Unstructured, removeDesc bool) *extensionsobj.CustomResourceDefinition {
|
||||
if removeDesc {
|
||||
removeDescription(un.Object)
|
||||
}
|
||||
unBytes, err := json.Marshal(un)
|
||||
checkErr(err)
|
||||
|
||||
@@ -92,6 +96,25 @@ func toCRD(un *unstructured.Unstructured) *extensionsobj.CustomResourceDefinitio
|
||||
return &crd
|
||||
}
|
||||
|
||||
func removeDescription(v interface{}) {
|
||||
switch v := v.(type) {
|
||||
case []interface{}:
|
||||
for _, v := range v {
|
||||
removeDescription(v)
|
||||
}
|
||||
case map[string]interface{}:
|
||||
if _, ok := v["description"]; ok {
|
||||
_, ok := v["description"].(string)
|
||||
if ok {
|
||||
delete(v, "description")
|
||||
}
|
||||
}
|
||||
for _, v := range v {
|
||||
removeDescription(v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func checkErr(err error) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
95
hack/generate-release-notes.sh
Executable file
95
hack/generate-release-notes.sh
Executable file
@@ -0,0 +1,95 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ]; then
|
||||
cat <<-EOM
|
||||
USAGE:
|
||||
|
||||
generate-release-notes.sh NEW_REF OLD_REF NEW_VERSION
|
||||
|
||||
EXAMPLES:
|
||||
|
||||
# For releasing a new minor version:
|
||||
generate-release-notes.sh release-2.5 release-2.4 v2.5.0-rc1 > /tmp/release.md
|
||||
|
||||
# For a patch release:
|
||||
generate-release-notes.sh release-2.4 v2.4.13 v2.4.14 > /tmp/release.md
|
||||
EOM
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function to_list_items() {
|
||||
sed 's/^/- /'
|
||||
}
|
||||
|
||||
function strip_last_word() {
|
||||
sed 's/ [^ ]*$//'
|
||||
}
|
||||
|
||||
function nonempty_line_count() {
|
||||
sed '/^\s*$/d' | wc -l | tr -d ' \n'
|
||||
}
|
||||
|
||||
function only_last_word() {
|
||||
awk 'NF>1{print $NF}'
|
||||
}
|
||||
|
||||
new_ref=$1
|
||||
old_ref=$2
|
||||
version=$3
|
||||
|
||||
cat <<-EOM
|
||||
## Quick Start
|
||||
|
||||
### Non-HA:
|
||||
|
||||
\`\`\`shell
|
||||
kubectl create namespace argocd
|
||||
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/$version/manifests/install.yaml
|
||||
\`\`\`
|
||||
|
||||
### HA:
|
||||
|
||||
\`\`\`shell
|
||||
kubectl create namespace argocd
|
||||
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/$version/manifests/ha/install.yaml
|
||||
\`\`\`
|
||||
|
||||
## Upgrading
|
||||
|
||||
If upgrading from a different minor version, be sure to read the [upgrading](https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/overview/) documentation.
|
||||
|
||||
EOM
|
||||
|
||||
# Adapted from https://stackoverflow.com/a/67029088/684776
|
||||
less_log=$(git log --pretty="format:%s %ae" --cherry-pick --left-only --no-merges "$new_ref...$old_ref")
|
||||
more_log=$(git log --pretty="format:%s %ae" "$new_ref..$old_ref")
|
||||
|
||||
new_commits=$(diff --new-line-format="" --unchanged-line-format="" <(echo "$less_log") <(echo "$more_log") | grep -v "Merge pull request from GHSA")
|
||||
new_commits_no_email=$(echo "$new_commits" | strip_last_word)
|
||||
|
||||
contributors_num=$(echo "$new_commits" | only_last_word | sort -u | nonempty_line_count)
|
||||
|
||||
new_commits_num=$(echo "$new_commits" | nonempty_line_count)
|
||||
features_num=$(echo "$new_commits_no_email" | grep '^feat' | nonempty_line_count)
|
||||
fixes_num=$(echo "$new_commits_no_email" | grep '^fix' | nonempty_line_count)
|
||||
|
||||
previous_contributors=$(git log --pretty="format:%an %ae" "$old_ref" | sort -uf)
|
||||
all_contributors=$(git log --pretty="format:%an %ae" "$new_ref" | sort -uf)
|
||||
new_contributors=$(diff --new-line-format="" --unchanged-line-format="" <(echo "$all_contributors") <(echo "$previous_contributors"))
|
||||
new_contributors_num=$(echo "$new_contributors" | only_last_word | nonempty_line_count) # Count contributors by email
|
||||
new_contributors_names=$(echo "$new_contributors" | strip_last_word | to_list_items)
|
||||
|
||||
new_contributors_message=""
|
||||
if [ "$new_contributors_num" -gt 0 ]; then
|
||||
new_contributors_message=" ($new_contributors_num of them new)"
|
||||
fi
|
||||
|
||||
echo "## Changes"
|
||||
echo
|
||||
echo "This release includes $new_commits_num contributions from $contributors_num contributors$new_contributors_message with $features_num features and $fixes_num bug fixes."
|
||||
echo
|
||||
if [ "$new_contributors_num" -lt 20 ] && [ "$new_contributors_num" -gt 0 ]; then
|
||||
echo "A special thanks goes to the $new_contributors_num new contributors:"
|
||||
echo "$new_contributors_names"
|
||||
echo
|
||||
fi
|
||||
@@ -30,6 +30,7 @@ cleanup() {
|
||||
|
||||
if test "${NEW_TAG}" = "" -o "${GIT_REMOTE}" = ""; then
|
||||
echo "!! Usage: $0 <release tag> <remote> [path to release notes file]" >&2
|
||||
echo "You can use generate-release-notes.sh to generate the release notes file." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ kind: Kustomization
|
||||
images:
|
||||
- name: quay.io/argoproj/argocd
|
||||
newName: quay.io/argoproj/argocd
|
||||
newTag: latest
|
||||
newTag: v2.5.0-rc2
|
||||
resources:
|
||||
- ./application-controller
|
||||
- ./dex
|
||||
|
||||
@@ -336,8 +336,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -682,8 +682,7 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management plugin
|
||||
specific options
|
||||
description: Plugin holds config management plugin specific options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -1038,8 +1037,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -1410,8 +1409,8 @@ spec:
|
||||
from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin
|
||||
specific options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -1754,8 +1753,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -2092,8 +2091,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -2159,6 +2158,7 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applicationsets.argoproj.io
|
||||
app.kubernetes.io/part-of: argocd
|
||||
name: applicationsets.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
@@ -9632,7 +9632,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -9890,7 +9890,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -9941,7 +9941,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -10148,7 +10148,7 @@ spec:
|
||||
key: application.namespaces
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -12,4 +12,4 @@ resources:
|
||||
images:
|
||||
- name: quay.io/argoproj/argocd
|
||||
newName: quay.io/argoproj/argocd
|
||||
newTag: latest
|
||||
newTag: v2.5.0-rc2
|
||||
|
||||
@@ -335,8 +335,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -681,8 +681,7 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management plugin
|
||||
specific options
|
||||
description: Plugin holds config management plugin specific options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -1037,8 +1036,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -1409,8 +1408,8 @@ spec:
|
||||
from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin
|
||||
specific options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -1753,8 +1752,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -2091,8 +2090,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
|
||||
@@ -3,6 +3,7 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applicationsets.argoproj.io
|
||||
app.kubernetes.io/part-of: argocd
|
||||
name: applicationsets.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
|
||||
@@ -11,7 +11,7 @@ patchesStrategicMerge:
|
||||
images:
|
||||
- name: quay.io/argoproj/argocd
|
||||
newName: quay.io/argoproj/argocd
|
||||
newTag: latest
|
||||
newTag: v2.5.0-rc2
|
||||
resources:
|
||||
- ../../base/application-controller
|
||||
- ../../base/applicationset-controller
|
||||
|
||||
@@ -336,8 +336,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -682,8 +682,7 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management plugin
|
||||
specific options
|
||||
description: Plugin holds config management plugin specific options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -1038,8 +1037,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -1410,8 +1409,8 @@ spec:
|
||||
from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin
|
||||
specific options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -1754,8 +1753,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -2092,8 +2091,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -2159,6 +2158,7 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applicationsets.argoproj.io
|
||||
app.kubernetes.io/part-of: argocd
|
||||
name: applicationsets.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
@@ -10881,7 +10881,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -10991,7 +10991,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /shared/argocd-dex
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: copyutil
|
||||
securityContext:
|
||||
@@ -11044,7 +11044,7 @@ spec:
|
||||
containers:
|
||||
- command:
|
||||
- argocd-notifications
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
@@ -11341,7 +11341,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -11392,7 +11392,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -11665,7 +11665,7 @@ spec:
|
||||
key: application.namespaces
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -11900,7 +11900,7 @@ spec:
|
||||
key: application.namespaces
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -1550,7 +1550,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -1660,7 +1660,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /shared/argocd-dex
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: copyutil
|
||||
securityContext:
|
||||
@@ -1713,7 +1713,7 @@ spec:
|
||||
containers:
|
||||
- command:
|
||||
- argocd-notifications
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
@@ -2010,7 +2010,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -2061,7 +2061,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -2334,7 +2334,7 @@ spec:
|
||||
key: application.namespaces
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -2569,7 +2569,7 @@ spec:
|
||||
key: application.namespaces
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -336,8 +336,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -682,8 +682,7 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management plugin
|
||||
specific options
|
||||
description: Plugin holds config management plugin specific options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -1038,8 +1037,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable entries
|
||||
@@ -1410,8 +1409,8 @@ spec:
|
||||
from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin
|
||||
specific options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -1754,8 +1753,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -2092,8 +2091,8 @@ spec:
|
||||
and is only valid for applications sourced from Git.
|
||||
type: string
|
||||
plugin:
|
||||
description: ConfigManagementPlugin holds config management
|
||||
plugin specific options
|
||||
description: Plugin holds config management plugin specific
|
||||
options
|
||||
properties:
|
||||
env:
|
||||
description: Env is a list of environment variable
|
||||
@@ -2159,6 +2158,7 @@ kind: CustomResourceDefinition
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: applicationsets.argoproj.io
|
||||
app.kubernetes.io/part-of: argocd
|
||||
name: applicationsets.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
@@ -9952,7 +9952,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -10062,7 +10062,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /shared/argocd-dex
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: copyutil
|
||||
securityContext:
|
||||
@@ -10115,7 +10115,7 @@ spec:
|
||||
containers:
|
||||
- command:
|
||||
- argocd-notifications
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
@@ -10368,7 +10368,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -10419,7 +10419,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -10688,7 +10688,7 @@ spec:
|
||||
key: application.namespaces
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -10921,7 +10921,7 @@ spec:
|
||||
key: application.namespaces
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -621,7 +621,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-applicationset-controller
|
||||
ports:
|
||||
@@ -731,7 +731,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /shared/argocd-dex
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: copyutil
|
||||
securityContext:
|
||||
@@ -784,7 +784,7 @@ spec:
|
||||
containers:
|
||||
- command:
|
||||
- argocd-notifications
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
@@ -1037,7 +1037,7 @@ spec:
|
||||
value: /helm-working-dir
|
||||
- name: HELM_DATA_HOME
|
||||
value: /helm-working-dir
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
@@ -1088,7 +1088,7 @@ spec:
|
||||
- -n
|
||||
- /usr/local/bin/argocd
|
||||
- /var/run/argocd/argocd-cmp-server
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
name: copyutil
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -1357,7 +1357,7 @@ spec:
|
||||
key: application.namespaces
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
@@ -1590,7 +1590,7 @@ spec:
|
||||
key: application.namespaces
|
||||
name: argocd-cmd-params-cm
|
||||
optional: true
|
||||
image: quay.io/argoproj/argocd:latest
|
||||
image: quay.io/argoproj/argocd:v2.5.0-rc2
|
||||
imagePullPolicy: Always
|
||||
name: argocd-application-controller
|
||||
ports:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strconv"
|
||||
strings "strings"
|
||||
"strings"
|
||||
|
||||
"github.com/argoproj/argo-cd/v2/util/git"
|
||||
"github.com/argoproj/argo-cd/v2/util/glob"
|
||||
@@ -167,6 +167,10 @@ func (p *AppProject) ValidateProject() error {
|
||||
}
|
||||
|
||||
key := fmt.Sprintf("%s/%s", dest.Server, dest.Namespace)
|
||||
if dest.Server == "" && dest.Name != "" {
|
||||
// destination cluster set using name instead of server endpoint
|
||||
key = fmt.Sprintf("%s/%s", dest.Name, dest.Namespace)
|
||||
}
|
||||
if _, ok := destKeys[key]; ok {
|
||||
return status.Errorf(codes.InvalidArgument, "destination '%s' already added", key)
|
||||
}
|
||||
@@ -176,9 +180,9 @@ func (p *AppProject) ValidateProject() error {
|
||||
srcNamespaces := make(map[string]bool)
|
||||
for _, ns := range p.Spec.SourceNamespaces {
|
||||
if _, ok := srcNamespaces[ns]; ok {
|
||||
return status.Errorf(codes.InvalidArgument, "source namespaces '%s' already added", ns)
|
||||
return status.Errorf(codes.InvalidArgument, "source namespace '%s' already added", ns)
|
||||
}
|
||||
destKeys[ns] = true
|
||||
srcNamespaces[ns] = true
|
||||
}
|
||||
|
||||
srcRepos := make(map[string]bool)
|
||||
|
||||
@@ -322,7 +322,7 @@ message ApplicationSource {
|
||||
// Directory holds path/directory specific options
|
||||
optional ApplicationSourceDirectory directory = 10;
|
||||
|
||||
// ConfigManagementPlugin holds config management plugin specific options
|
||||
// Plugin holds config management plugin specific options
|
||||
optional ApplicationSourcePlugin plugin = 11;
|
||||
|
||||
// Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo.
|
||||
|
||||
@@ -1209,7 +1209,7 @@ func schema_pkg_apis_application_v1alpha1_ApplicationSource(ref common.Reference
|
||||
},
|
||||
"plugin": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "ConfigManagementPlugin holds config management plugin specific options",
|
||||
Description: "Plugin holds config management plugin specific options",
|
||||
Ref: ref("github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1.ApplicationSourcePlugin"),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -166,7 +166,7 @@ type ApplicationSource struct {
|
||||
Kustomize *ApplicationSourceKustomize `json:"kustomize,omitempty" protobuf:"bytes,8,opt,name=kustomize"`
|
||||
// Directory holds path/directory specific options
|
||||
Directory *ApplicationSourceDirectory `json:"directory,omitempty" protobuf:"bytes,10,opt,name=directory"`
|
||||
// ConfigManagementPlugin holds config management plugin specific options
|
||||
// Plugin holds config management plugin specific options
|
||||
Plugin *ApplicationSourcePlugin `json:"plugin,omitempty" protobuf:"bytes,11,opt,name=plugin"`
|
||||
// Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo.
|
||||
Chart string `json:"chart,omitempty" protobuf:"bytes,12,opt,name=chart"`
|
||||
|
||||
@@ -582,6 +582,25 @@ func TestAppProject_ValidateDestinations(t *testing.T) {
|
||||
p.Spec.Destinations = []ApplicationDestination{validDestination, validDestination}
|
||||
err = p.ValidateProject()
|
||||
assert.Error(t, err)
|
||||
|
||||
cluster1Destination := ApplicationDestination{
|
||||
Name: "cluster1",
|
||||
Namespace: "some-namespace",
|
||||
}
|
||||
cluster2Destination := ApplicationDestination{
|
||||
Name: "cluster2",
|
||||
Namespace: "some-namespace",
|
||||
}
|
||||
// allow multiple destinations with blank server, same namespace but unique cluster name
|
||||
p.Spec.Destinations = []ApplicationDestination{cluster1Destination, cluster2Destination}
|
||||
err = p.ValidateProject()
|
||||
assert.NoError(t, err)
|
||||
|
||||
t.Run("must reject duplicate source namespaces", func(t *testing.T) {
|
||||
p.Spec.SourceNamespaces = []string{"argocd", "argocd"}
|
||||
err = p.ValidateProject()
|
||||
assert.Error(t, err)
|
||||
})
|
||||
}
|
||||
|
||||
// TestValidateRoleName tests for an invalid role name
|
||||
|
||||
@@ -36,11 +36,21 @@ if obj.status ~= nil then
|
||||
health_status.message = obj.status.currentState
|
||||
return health_status
|
||||
end
|
||||
if obj.status.currentState == "Tenant credentials are not set properly" then
|
||||
health_status.status = "Degraded"
|
||||
health_status.message = obj.status.currentState
|
||||
return health_status
|
||||
end
|
||||
if obj.status.currentState == "Different versions across MinIO Pools" then
|
||||
health_status.status = "Degraded"
|
||||
health_status.message = obj.status.currentState
|
||||
return health_status
|
||||
end
|
||||
if obj.status.currentState == "Pool Decommissioning Not Allowed" then
|
||||
health_status.status = "Degraded"
|
||||
health_status.message = obj.status.currentState
|
||||
return health_status
|
||||
end
|
||||
health_status.status = "Progressing"
|
||||
health_status.message = obj.status.currentState
|
||||
return health_status
|
||||
|
||||
@@ -23,10 +23,18 @@ tests:
|
||||
status: Degraded
|
||||
message: "Another MinIO Tenant already exists in the namespace"
|
||||
inputPath: testdata/another_tenant_exists.yaml
|
||||
- healthStatus:
|
||||
status: Degraded
|
||||
message: "Tenant credentials are not set properly"
|
||||
inputPath: testdata/incorrect_tenant_credentials.yaml
|
||||
- healthStatus:
|
||||
status: Degraded
|
||||
message: "Different versions across MinIO Pools"
|
||||
inputPath: testdata/versions_mismatch.yaml
|
||||
- healthStatus:
|
||||
status: Degraded
|
||||
message: "Pool Decommissioning Not Allowed"
|
||||
inputPath: testdata/pool_decommissioning_not_allowed.yaml
|
||||
- healthStatus:
|
||||
status: Progressing
|
||||
message: "<unknown status message>"
|
||||
|
||||
13
resource_customizations/minio.min.io/Tenant/testdata/incorrect_tenant_credentials.yaml
vendored
Normal file
13
resource_customizations/minio.min.io/Tenant/testdata/incorrect_tenant_credentials.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: minio.min.io/v2
|
||||
kind: Tenant
|
||||
metadata:
|
||||
name: minio-tenant
|
||||
spec:
|
||||
image: minio/minio:latest
|
||||
pools:
|
||||
- name: pool-0
|
||||
servers: 1
|
||||
volumesPerServer: 4
|
||||
status:
|
||||
revision: 0
|
||||
currentState: Tenant credentials are not set properly
|
||||
13
resource_customizations/minio.min.io/Tenant/testdata/pool_decommissioning_not_allowed.yaml
vendored
Normal file
13
resource_customizations/minio.min.io/Tenant/testdata/pool_decommissioning_not_allowed.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: minio.min.io/v2
|
||||
kind: Tenant
|
||||
metadata:
|
||||
name: minio-tenant
|
||||
spec:
|
||||
image: minio/minio:latest
|
||||
pools:
|
||||
- name: pool-0
|
||||
servers: 1
|
||||
volumesPerServer: 4
|
||||
status:
|
||||
revision: 0
|
||||
currentState: Pool Decommissioning Not Allowed
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
healthutil "github.com/argoproj/gitops-engine/pkg/health"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
@@ -107,7 +108,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
//Sample url: http://localhost:8080/api/badge?name=123&revision=true
|
||||
if _, ok := r.URL.Query()["revision"]; ok && enabled {
|
||||
if revisionParam, ok := r.URL.Query()["revision"]; ok && enabled && strings.EqualFold(revisionParam[0], "true") {
|
||||
revisionEnabled = true
|
||||
}
|
||||
|
||||
|
||||
@@ -9,5 +9,3 @@ spec:
|
||||
discover:
|
||||
find:
|
||||
glob: "**/kustomization.yaml"
|
||||
allowConcurrency: true
|
||||
lockRepo: false
|
||||
|
||||
@@ -9,5 +9,3 @@ spec:
|
||||
discover:
|
||||
find:
|
||||
command: [sh, -c, find . -name env.yaml]
|
||||
allowConcurrency: true
|
||||
lockRepo: false
|
||||
2
test/e2e/testdata/cmp-find-glob/plugin.yaml
vendored
2
test/e2e/testdata/cmp-find-glob/plugin.yaml
vendored
@@ -12,5 +12,3 @@ spec:
|
||||
find:
|
||||
command: [sh, -c, find . -name kustomization.yaml]
|
||||
glob: "**/kustomization.yaml"
|
||||
allowConcurrency: true
|
||||
lockRepo: false
|
||||
@@ -770,7 +770,7 @@ export class ApplicationDetails extends React.Component<RouteComponentProps<{app
|
||||
|
||||
private onAppDeleted() {
|
||||
this.appContext.apis.notifications.show({type: NotificationType.Success, content: `Application '${this.props.match.params.name}' was deleted`});
|
||||
this.appContext.apis.navigation.goto('/applications', {view: 'tiles'});
|
||||
this.appContext.apis.navigation.goto('/applications');
|
||||
}
|
||||
|
||||
private async updateApp(app: appModels.Application, query: {validate?: boolean}) {
|
||||
|
||||
@@ -84,13 +84,15 @@ export const ApplicationRetryOptions = ({
|
||||
initValues,
|
||||
field = 'retryStrategy',
|
||||
retry,
|
||||
setRetry
|
||||
setRetry,
|
||||
id
|
||||
}: {
|
||||
formApi: FormApi;
|
||||
field?: string;
|
||||
initValues?: models.RetryStrategy;
|
||||
retry?: boolean;
|
||||
setRetry?: (value: boolean) => any;
|
||||
id?: string;
|
||||
}) => {
|
||||
const [retryInternal, setRetryInternal] = React.useState(!!initValues);
|
||||
|
||||
@@ -118,8 +120,8 @@ export const ApplicationRetryOptions = ({
|
||||
const isChecked = setRetry != null ? retry : retryInternal;
|
||||
return (
|
||||
<div className='application-retry-options'>
|
||||
<Checkbox id='retry' checked={isChecked} onChange={val => toggleRetry(val)} />
|
||||
<label htmlFor='retry'>Retry</label>
|
||||
<Checkbox id={`retry-${id}`} checked={isChecked} onChange={val => toggleRetry(val)} />
|
||||
<label htmlFor={`retry-${id}`}>Retry</label>
|
||||
{isChecked && <ApplicationRetryForm initValues={initValues} field={field} />}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -11,6 +11,7 @@ export const FORCE_WARNING = `The resources will be synced using '--force' that
|
||||
export interface ApplicationSyncOptionProps {
|
||||
options: string[];
|
||||
onChanged: (updatedOptions: string[]) => any;
|
||||
id?: string;
|
||||
}
|
||||
|
||||
function selectOption(name: string, label: string, defaultVal: string, values: string[], props: ApplicationSyncOptionProps) {
|
||||
@@ -47,7 +48,7 @@ function booleanOption(name: string, label: string, defaultVal: boolean, props:
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Checkbox
|
||||
id={`sync-option-${name}`}
|
||||
id={`sync-option-${name}-${props.id}`}
|
||||
checked={checked}
|
||||
onChange={(val: boolean) => {
|
||||
if (index < 0) {
|
||||
@@ -58,7 +59,7 @@ function booleanOption(name: string, label: string, defaultVal: boolean, props:
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<label htmlFor={`sync-option-${name}`}>{label}</label>{' '}
|
||||
<label htmlFor={`sync-option-${name}-${props.id}`}>{label}</label>{' '}
|
||||
{warning && (
|
||||
<>
|
||||
<Tooltip content={warning}>
|
||||
@@ -115,7 +116,7 @@ export const ApplicationSyncOptions = (props: ApplicationSyncOptionProps) => (
|
||||
</div>
|
||||
);
|
||||
|
||||
export const ApplicationManualSyncFlags = ReactForm.FormField((props: {fieldApi: ReactForm.FieldApi}) => {
|
||||
export const ApplicationManualSyncFlags = ReactForm.FormField((props: {fieldApi: ReactForm.FieldApi; id?: string}) => {
|
||||
const {
|
||||
fieldApi: {getValue, setValue, setTouched}
|
||||
} = props;
|
||||
@@ -125,7 +126,7 @@ export const ApplicationManualSyncFlags = ReactForm.FormField((props: {fieldApi:
|
||||
{Object.keys(ManualSyncFlags).map(flag => (
|
||||
<React.Fragment key={flag}>
|
||||
<Checkbox
|
||||
id={`sync-option-${flag}`}
|
||||
id={`sync-option-${flag}-${props.id}`}
|
||||
checked={val[flag]}
|
||||
onChange={(newVal: boolean) => {
|
||||
setTouched(true);
|
||||
@@ -134,7 +135,7 @@ export const ApplicationManualSyncFlags = ReactForm.FormField((props: {fieldApi:
|
||||
setValue(update);
|
||||
}}
|
||||
/>
|
||||
<label htmlFor={`sync-option-${flag}`}>{ManualSyncFlags[flag as keyof typeof ManualSyncFlags]}</label>{' '}
|
||||
<label htmlFor={`sync-option-${flag}-${props.id}`}>{ManualSyncFlags[flag as keyof typeof ManualSyncFlags]}</label>{' '}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -137,10 +137,15 @@ export const ApplicationSyncPanel = ({application, selectedResource, hide}: {app
|
||||
formApi.setTouched('syncOptions', true);
|
||||
formApi.setValue('syncOptions', opts);
|
||||
}}
|
||||
id='application-sync-panel'
|
||||
/>
|
||||
</div>
|
||||
|
||||
<ApplicationRetryOptions formApi={formApi} initValues={application.spec.syncPolicy ? application.spec.syncPolicy.retry : null} />
|
||||
<ApplicationRetryOptions
|
||||
id='application-sync-panel'
|
||||
formApi={formApi}
|
||||
initValues={application.spec.syncPolicy ? application.spec.syncPolicy.retry : null}
|
||||
/>
|
||||
|
||||
<label>Synchronize resources:</label>
|
||||
<div style={{float: 'right'}}>
|
||||
|
||||
@@ -308,18 +308,18 @@ export const ApplicationsList = (props: RouteComponentProps<{}>) => {
|
||||
const loaderRef = React.useRef<DataLoader>();
|
||||
const {List, Summary, Tiles} = AppsListViewKey;
|
||||
|
||||
function refreshApp(appName: string) {
|
||||
function refreshApp(appName: string, appNamespace: string) {
|
||||
// app refreshing might be done too quickly so that UI might miss it due to event batching
|
||||
// add refreshing annotation in the UI to improve user experience
|
||||
if (loaderRef.current) {
|
||||
const applications = loaderRef.current.getData() as models.Application[];
|
||||
const app = applications.find(item => item.metadata.name === appName);
|
||||
const app = applications.find(item => item.metadata.name === appName && item.metadata.namespace === appNamespace);
|
||||
if (app) {
|
||||
AppUtils.setAppRefreshing(app);
|
||||
loaderRef.current.setData(applications);
|
||||
}
|
||||
}
|
||||
services.applications.get(appName, 'normal');
|
||||
services.applications.get(appName, appNamespace, 'normal');
|
||||
}
|
||||
|
||||
function onFilterPrefChanged(ctx: ContextApis, newPref: AppsListPreferences) {
|
||||
|
||||
@@ -141,10 +141,11 @@ export const ApplicationsSyncPanel = ({show, apps, hide}: {show: boolean; apps:
|
||||
formApi.setTouched('syncOptions', true);
|
||||
formApi.setValue('syncOptions', opts);
|
||||
}}
|
||||
id='applications-sync-panel'
|
||||
/>
|
||||
</div>
|
||||
|
||||
<ApplicationRetryOptions formApi={formApi} />
|
||||
<ApplicationRetryOptions id='applications-sync-panel' formApi={formApi} />
|
||||
|
||||
<ApplicationSelector apps={apps} formApi={formApi} />
|
||||
</div>
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
label {
|
||||
color: #6D7F8B;
|
||||
font-size: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export function revisionUrl(url: string, revision: string): string {
|
||||
let urlSubPath = isSHA(revision) ? 'commit' : 'tree';
|
||||
|
||||
if (url.indexOf('bitbucket') >= 0) {
|
||||
urlSubPath = isSHA(revision) ? 'commits' : 'branch';
|
||||
urlSubPath = isSHA(revision) ? 'commits' : 'src';
|
||||
}
|
||||
|
||||
if (!supportedSource(parsed)) {
|
||||
|
||||
@@ -137,7 +137,7 @@ const DEFAULT_PREFERENCES: ViewPreferences = {
|
||||
},
|
||||
pageSizes: {},
|
||||
hideBannerContent: '',
|
||||
hideSidebar: true,
|
||||
hideSidebar: false,
|
||||
position: '',
|
||||
theme: 'light'
|
||||
};
|
||||
|
||||
@@ -52,8 +52,10 @@
|
||||
width: 35px;
|
||||
}
|
||||
|
||||
i.fa-sign-in-alt {
|
||||
i.fa {
|
||||
font-size: 22px;
|
||||
margin-left: 3px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
&--active {
|
||||
@@ -83,5 +85,9 @@
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.sidebar__nav-item i.fa {
|
||||
margin-left: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,17 @@ export const Sidebar = (props: SidebarProps) => {
|
||||
const [version, loading, error] = useData(() => services.version.version());
|
||||
const locationPath = context.history.location.pathname;
|
||||
|
||||
const tooltipProps = {
|
||||
placement: 'right',
|
||||
popperOptions: {
|
||||
modifiers: {
|
||||
preventOverflow: {
|
||||
boundariesElement: 'window'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`sidebar ${props.pref.hideSidebar ? 'sidebar--collapsed' : ''}`}>
|
||||
<div className='sidebar__logo'>
|
||||
@@ -42,17 +53,7 @@ export const Sidebar = (props: SidebarProps) => {
|
||||
{loading ? 'Loading...' : error?.state ? 'Unknown' : version?.Version || 'Unknown'}
|
||||
</div>
|
||||
{(props.navItems || []).map(item => (
|
||||
<Tooltip
|
||||
key={item.path}
|
||||
content={item?.tooltip || item.title}
|
||||
placement='right'
|
||||
popperOptions={{
|
||||
modifiers: {
|
||||
preventOverflow: {
|
||||
boundariesElement: 'window'
|
||||
}
|
||||
}
|
||||
}}>
|
||||
<Tooltip key={item.path} content={item?.tooltip || item.title} {...tooltipProps}>
|
||||
<div
|
||||
key={item.title}
|
||||
className={`sidebar__nav-item ${locationPath === item.path || locationPath.startsWith(`${item.path}/`) ? 'sidebar__nav-item--active' : ''}`}
|
||||
@@ -69,6 +70,15 @@ export const Sidebar = (props: SidebarProps) => {
|
||||
<div onClick={() => services.viewPreferences.updatePreferences({...props.pref, hideSidebar: !props.pref.hideSidebar})} className='sidebar__collapse-button'>
|
||||
<i className={`fas fa-arrow-${props.pref.hideSidebar ? 'right' : 'left'}`} />
|
||||
</div>
|
||||
{props.pref.hideSidebar && (
|
||||
<div onClick={() => services.viewPreferences.updatePreferences({...props.pref, hideSidebar: !props.pref.hideSidebar})} className='sidebar__collapse-button'>
|
||||
<Tooltip content='Show Filters' {...tooltipProps}>
|
||||
<div className='sidebar__nav-item'>
|
||||
<i className={`fas fa-filter`} style={{fontSize: '14px', margin: '0 auto'}} />
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
)}
|
||||
<div id={SIDEBAR_TOOLS_ID} />
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user