Skip to content

Commit

Permalink
rebase: update dockerfile, makefile, api, config & bundle manifests (…
Browse files Browse the repository at this point in the history
…2/?) (argoproj-labs#1134)

* update dockerfile, makefile, api, config & bundle folders, coding snp doc

---------

Signed-off-by: Jaideep Rao <jaideep.r97@gmail.com>
  • Loading branch information
jaideepr97 authored Jan 5, 2024
1 parent ae37d0a commit a6b6fdc
Show file tree
Hide file tree
Showing 31 changed files with 39,737 additions and 13,633 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.19 as builder
FROM golang:1.20 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -14,6 +14,7 @@ COPY main.go main.go
COPY api/ api/
COPY common/ common/
COPY controllers/ controllers/
COPY pkg/ pkg/
COPY version/ version/

# Build
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.8.0
VERSION ?= 0.9.0

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down
249 changes: 180 additions & 69 deletions api/v1alpha1/argocd_conversion.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/v1alpha1/argocd_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ func (a *ArgoCD) ApplicationInstanceLabelKey() string {
if a.Spec.ApplicationInstanceLabelKey != "" {
return a.Spec.ApplicationInstanceLabelKey
} else {
return common.AppK8sKeyInstance
return common.ArgoCDDefaultApplicationInstanceLabelKey
}
}

Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/argocd_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func Test_ArgoCD_ApplicationInstanceLabelKey(t *testing.T) {
cr.Spec.ApplicationInstanceLabelKey = "my.corp/instance"
assert.Equal(t, cr.ApplicationInstanceLabelKey(), "my.corp/instance")
cr = &ArgoCD{}
assert.Equal(t, cr.ApplicationInstanceLabelKey(), common.AppK8sKeyInstance)
assert.Equal(t, cr.ApplicationInstanceLabelKey(), common.ArgoCDDefaultApplicationInstanceLabelKey)
}

func Test_ResourceTrackingMethodToString(t *testing.T) {
Expand Down
48 changes: 46 additions & 2 deletions api/v1beta1/argocd_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ type ArgoCDApplicationControllerSpec struct {

// Env lets you specify environment for application controller pods
Env []corev1.EnvVar `json:"env,omitempty"`

// Enabled is the flag to enable the Application Controller during ArgoCD installation. (optional, default `true`)
Enabled *bool `json:"enabled,omitempty"`
}

func (a *ArgoCDApplicationControllerSpec) IsEnabled() bool {
return a.Enabled == nil || (a.Enabled != nil && *a.Enabled)
}

// ArgoCDApplicationControllerShardSpec defines the options available for enabling sharding for the Application Controller component.
Expand Down Expand Up @@ -162,6 +169,13 @@ type ArgoCDApplicationSet struct {

// SCMRootCAConfigMap is the name of the config map that stores the Gitlab SCM Provider's TLS certificate which will be mounted on the ApplicationSet Controller (optional).
SCMRootCAConfigMap string `json:"scmRootCAConfigMap,omitempty"`

// Enabled is the flag to enable the Application Set Controller during ArgoCD installation. (optional, default `true`)
Enabled *bool `json:"enabled,omitempty"`
}

func (a *ArgoCDApplicationSet) IsEnabled() bool {
return a.Enabled == nil || (a.Enabled != nil && *a.Enabled)
}

// ArgoCDCASpec defines the CA options for ArgCD.
Expand Down Expand Up @@ -203,6 +217,9 @@ type ArgoCDDexSpec struct {
// Version is the Dex container image tag.
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Version",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex","urn:alm:descriptor:com.tectonic.ui:text"}
Version string `json:"version,omitempty"`

// Env lets you specify environment variables for Dex.
Env []corev1.EnvVar `json:"env,omitempty"`
}

// ArgoCDGrafanaSpec defines the desired state for the Grafana component.
Expand Down Expand Up @@ -410,6 +427,16 @@ type ArgoCDRedisSpec struct {
// The value specified here can currently be:
// - openshift - Use the OpenShift service CA to request TLS config
AutoTLS string `json:"autotls,omitempty"`

// Enabled is the flag to enable Redis during ArgoCD installation. (optional, default `true`)
Enabled *bool `json:"enabled,omitempty"`

// Remote specifies the remote URL of the Redis container. (optional, by default, a local instance managed by the operator is used.)
Remote *string `json:"remote,omitempty"`
}

func (a *ArgoCDRedisSpec) IsEnabled() bool {
return a.Enabled == nil || (a.Enabled != nil && *a.Enabled)
}

// ArgoCDRepoSpec defines the desired state for the Argo CD repo server component.
Expand Down Expand Up @@ -470,6 +497,16 @@ type ArgoCDRepoSpec struct {

// SidecarContainers defines the list of sidecar containers for the repo server deployment
SidecarContainers []corev1.Container `json:"sidecarContainers,omitempty"`

// Enabled is the flag to enable Repo Server during ArgoCD installation. (optional, default `true`)
Enabled *bool `json:"enabled,omitempty"`

// Remote specifies the remote URL of the Repo Server container. (optional, by default, a local instance managed by the operator is used.)
Remote *string `json:"remote,omitempty"`
}

func (a *ArgoCDRepoSpec) IsEnabled() bool {
return a.Enabled == nil || (a.Enabled != nil && *a.Enabled)
}

// ArgoCDRouteSpec defines the desired state for an OpenShift Route.
Expand Down Expand Up @@ -560,6 +597,13 @@ type ArgoCDServerSpec struct {
// ExtraCommandArgs will not be added, if one of these commands is already part of the server command
// with same or different value.
ExtraCommandArgs []string `json:"extraCommandArgs,omitempty"`

// Enabled is the flag to enable ArgoCD Server during ArgoCD installation. (optional, default `true`)
Enabled *bool `json:"enabled,omitempty"`
}

func (a *ArgoCDServerSpec) IsEnabled() bool {
return a.Enabled == nil || (a.Enabled != nil && *a.Enabled)
}

// ArgoCDServerServiceSpec defines the Service options for Argo CD Server component.
Expand Down Expand Up @@ -934,7 +978,7 @@ type WebhookServerSpec struct {
// IsDeletionFinalizerPresent checks if the instance has deletion finalizer
func (argocd *ArgoCD) IsDeletionFinalizerPresent() bool {
for _, finalizer := range argocd.GetFinalizers() {
if finalizer == common.ArgoprojKeyFinalizer {
if finalizer == common.ArgoCDDeletionFinalizer {
return true
}
}
Expand Down Expand Up @@ -965,7 +1009,7 @@ func (a *ArgoCD) ApplicationInstanceLabelKey() string {
if a.Spec.ApplicationInstanceLabelKey != "" {
return a.Spec.ApplicationInstanceLabelKey
} else {
return common.AppK8sKeyInstance
return common.ArgoCDDefaultApplicationInstanceLabelKey
}
}

Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/argocd_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func Test_ArgoCD_ApplicationInstanceLabelKey(t *testing.T) {
cr.Spec.ApplicationInstanceLabelKey = "my.corp/instance"
assert.Equal(t, cr.ApplicationInstanceLabelKey(), "my.corp/instance")
cr = &ArgoCD{}
assert.Equal(t, cr.ApplicationInstanceLabelKey(), common.AppK8sKeyInstance)
assert.Equal(t, cr.ApplicationInstanceLabelKey(), common.ArgoCDDefaultApplicationInstanceLabelKey)
}

func Test_ResourceTrackingMethodToString(t *testing.T) {
Expand Down
42 changes: 42 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/util/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Argo CD v2.8.3
FROM quay.io/argoproj/argocd@sha256:d40da8f5747415eb7f9b5c2d9b645aecd423888cad9b36e4f986bff8ecf0a786 as argocd
# Argo CD v2.9.2
FROM quay.io/argoproj/argocd@sha256:8576d347f30fa4c56a0129d1c0a0f5ed1e75662f0499f1ed7e917c405fd909dc as argocd

# Final Image
FROM docker.io/library/ubuntu:22.04
Expand Down
19 changes: 3 additions & 16 deletions bundle/manifests/argocd-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ metadata:
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/argoproj-labs/argocd-operator
support: Argo CD
name: argocd-operator.v0.8.0
name: argocd-operator.v0.9.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -1732,8 +1732,6 @@ spec:
spec:
containers:
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
Expand All @@ -1744,7 +1742,7 @@ spec:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: ENABLE_CONVERSION_WEBHOOK
value: "true"
image: quay.io/argoprojlabs/argocd-operator:v0.8.0
image: quay.io/argoprojlabs/argocd-operator:v0.9.0
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -1770,17 +1768,6 @@ spec:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy@sha256:db06cc4c084dd0253134f156dddaaf53ef1c3fb3cc809e5d81711baa4029ea4c
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
resources: {}
securityContext:
runAsNonRoot: true
serviceAccountName: argocd-operator-controller-manager
Expand Down Expand Up @@ -1846,7 +1833,7 @@ spec:
provider:
name: Argo CD Community
replaces: argocd-operator.v0.7.0
version: 0.8.0
version: 0.9.0
webhookdefinitions:
- admissionReviewVersions:
- v1alpha1
Expand Down
Loading

0 comments on commit a6b6fdc

Please sign in to comment.