Skip to content

Commit

Permalink
fix: Revert "feat: Migrate dex to spec.sso (#488)" (#527)
Browse files Browse the repository at this point in the history
* Revert "feat: Migrate dex to spec.sso (#488)"

This reverts commit 6de5fc2.

* fix lint error
  • Loading branch information
jaideepr97 committed Dec 22, 2021
1 parent 2f43a08 commit 2da8dac
Show file tree
Hide file tree
Showing 31 changed files with 646 additions and 760 deletions.
35 changes: 11 additions & 24 deletions api/v1alpha1/argocd_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,21 +174,6 @@ type ArgoCDDexSpec struct {
Version string `json:"version,omitempty"`
}

// ArgoCDKeycloakSpec defines the desired state for the Keycloak component.
type ArgoCDKeycloakSpec struct {
// Image is the Keycloak container image.
Image string `json:"image,omitempty"`

// Resources defines the Compute Resources required by the container for Keycloak.
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`

// Version is the Keycloak container image tag.
Version string `json:"version,omitempty"`

// VerifyTLS set to false disables strict TLS validation.
VerifyTLS *bool `json:"verifyTLS,omitempty"`
}

// ArgoCDDexOAuthSpec defines the desired state for the Dex OAuth configuration.
type ArgoCDDexOAuthSpec struct {
// Enabled will toggle OAuth support for the Dex server.
Expand Down Expand Up @@ -495,21 +480,20 @@ const (
// SSOProviderTypeKeycloak means keycloak will be Installed and Integrated with Argo CD. A new realm with name argocd
// will be created in this keycloak. This realm will have a client with name argocd that uses OpenShift v4 as Identity Provider.
SSOProviderTypeKeycloak SSOProviderType = "keycloak"

// SSOProviderTypeDex means dex will be Installed and Integrated with Argo CD.
SSOProviderTypeDex SSOProviderType = "dex"
)

// ArgoCDSSOSpec defines SSO provider.
type ArgoCDSSOSpec struct {
// Dex contains the configuration for Argo CD dex authentication (previously found under cr.spec.Dex)
Dex ArgoCDDexSpec `json:"dex,omitempty"`

// Keycloak contains the configuration for Argo CD keycloak authentication (previously found under cr.spec.sso)
Keycloak ArgoCDKeycloakSpec `json:"keycloak,omitempty"`

// Image is the SSO container image.
Image string `json:"image,omitempty"`
// Provider installs and configures the given SSO Provider with Argo CD.
Provider SSOProviderType `json:"provider,omitempty"`
// Resources defines the Compute Resources required by the container for SSO.
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// VerifyTLS set to false disables strict TLS validation.
VerifyTLS *bool `json:"verifyTLS,omitempty"`
// Version is the SSO container image tag.
Version string `json:"version,omitempty"`
}

// KustomizeVersionSpec is used to specify information about a kustomize version to be used within ArgoCD.
Expand Down Expand Up @@ -546,6 +530,9 @@ type ArgoCDSpec struct {
// Controller defines the Application Controller options for ArgoCD.
Controller ArgoCDApplicationControllerSpec `json:"controller,omitempty"`

// Dex defines the Dex server options for ArgoCD.
Dex ArgoCDDexSpec `json:"dex,omitempty"`

// DisableAdmin will disable the admin user.
DisableAdmin bool `json:"disableAdmin,omitempty"`

Expand Down
38 changes: 11 additions & 27 deletions api/v1alpha1/zz_generated.deepcopy.go

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

64 changes: 32 additions & 32 deletions bundle/manifests/argocd-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,38 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Controller
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- description: Config is the dex connector configuration.
displayName: Configuration
path: dex.config
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:text
- description: Image is the Dex container image.
displayName: Image
path: dex.image
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:text
- description: OpenShiftOAuth enables OpenShift OAuth authentication for the
Dex server.
displayName: OpenShift OAuth Enabled'
path: dex.openShiftOAuth
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: Resources defines the Compute Resources required by the container
for Dex.
displayName: Resource Requirements'
path: dex.resources
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- description: Version is the Dex container image tag.
displayName: Version
path: dex.version
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:text
- description: GAAnonymizeUsers toggles user IDs being hashed before sending
to google analytics.
displayName: Google Analytics Anonymize Users'
Expand Down Expand Up @@ -617,38 +649,6 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Server
- urn:alm:descriptor:com.tectonic.ui:text
- description: Config is the dex connector configuration.
displayName: Configuration
path: sso.dex.config
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:text
- description: Image is the Dex container image.
displayName: Image
path: sso.dex.image
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:text
- description: OpenShiftOAuth enables OpenShift OAuth authentication for the
Dex server.
displayName: OpenShift OAuth Enabled'
path: sso.dex.openShiftOAuth
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
- description: Resources defines the Compute Resources required by the container
for Dex.
displayName: Resource Requirements'
path: sso.dex.resources
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
- description: Version is the Dex container image tag.
displayName: Version
path: sso.dex.version
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:Dex
- urn:alm:descriptor:com.tectonic.ui:text
- description: StatusBadgeEnabled toggles application status badge feature.
displayName: Status Badge Enabled'
path: statusBadgeEnabled
Expand Down
178 changes: 85 additions & 93 deletions bundle/manifests/argoproj.io_argocds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,56 @@ spec:
type: integer
type: object
type: object
dex:
description: Dex defines the Dex server options for ArgoCD.
properties:
config:
description: Config is the dex connector configuration.
type: string
groups:
description: Optional list of required groups a user must be a
member of
items:
type: string
type: array
image:
description: Image is the Dex container image.
type: string
openShiftOAuth:
description: OpenShiftOAuth enables OpenShift OAuth authentication
for the Dex server.
type: boolean
resources:
description: Resources defines the Compute Resources required
by the container for Dex.
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
version:
description: Version is the Dex container image tag.
type: string
type: object
disableAdmin:
description: DisableAdmin will disable the admin user.
type: boolean
Expand Down Expand Up @@ -4132,103 +4182,45 @@ spec:
description: SSO defines the Single Sign-on configuration for Argo
CD
properties:
dex:
description: Dex contains the configuration for Argo CD dex authentication
(previously found under cr.spec.Dex)
image:
description: Image is the SSO container image.
type: string
provider:
description: Provider installs and configures the given SSO Provider
with Argo CD.
type: string
resources:
description: Resources defines the Compute Resources required
by the container for SSO.
properties:
config:
description: Config is the dex connector configuration.
type: string
groups:
description: Optional list of required groups a user must
be a member of
items:
type: string
type: array
image:
description: Image is the Dex container image.
type: string
openShiftOAuth:
description: OpenShiftOAuth enables OpenShift OAuth authentication
for the Dex server.
type: boolean
resources:
description: Resources defines the Compute Resources required
by the container for Dex.
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of
compute resources required. If Requests is omitted for
a container, it defaults to Limits if that is explicitly
specified, otherwise to an implementation-defined value.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
version:
description: Version is the Dex container image tag.
type: string
type: object
keycloak:
description: Keycloak contains the configuration for Argo CD keycloak
authentication (previously found under cr.spec.sso)
properties:
image:
description: Image is the Keycloak container image.
type: string
resources:
description: Resources defines the Compute Resources required
by the container for Keycloak.
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of
compute resources required. If Requests is omitted for
a container, it defaults to Limits if that is explicitly
specified, otherwise to an implementation-defined value.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
verifyTLS:
description: VerifyTLS set to false disables strict TLS validation.
type: boolean
version:
description: Version is the Keycloak container image tag.
type: string
type: object
provider:
description: Provider installs and configures the given SSO Provider
with Argo CD.
verifyTLS:
description: VerifyTLS set to false disables strict TLS validation.
type: boolean
version:
description: Version is the SSO container image tag.
type: string
type: object
statusBadgeEnabled:
Expand Down
Loading

0 comments on commit 2da8dac

Please sign in to comment.