Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cert-manager): GitOps: Add support for installing issuers #1530

Closed
wants to merge 2 commits into from

Conversation

kbumsik
Copy link
Contributor

@kbumsik kbumsik commented Apr 3, 2023

What does this PR do?

Two descriptions for each commits:


feat(cert-manager): GitOps: Add support for installing issuers

Currently cert-manager with GitOps config has the two issues:

  1. It does not install CA, whereas it is installed by default without GitOps
  2. It does not support cert_manager_install_letsencrypt_issuers option.

To resolve the issue, I did the following:

  1. Copy the helm charts to eks-blueprints-add-ons as-is. See: feat(cert-manager): Add cert-manager-ca and cert-manager-letsencrypt aws-samples/eks-blueprints-add-ons#147
  2. Add additional configuration to support those two helm charts.

feat(argocd): handle complex object type for addon_config

The previous commit uses a complext object type to specify values for
a helm chart with multiple subcharts.

However this triggers Inconsistent conditional result types error like
following:

Error: Inconsistent conditional result types
on .terraform/modules/eks.blueprints_kubernetes_addons/modules/kubernetes-addons/argocd/main.tf line 72, in resource "helm_release" "argocd_application":
72: each.value.add_on_application ? var.addon_config : {}
├────────────────
│ each.value.add_on_application is true
│ var.addon_config is object with 10 attributes

The true and false result expressions must have consistent types. The
'true' value includes object attribute "awsEfsCsiDriver", which is absent
in the 'false' value.

To workaround the issue I had to encode & decode the line causing the issue.
It doesn't look pretty but I don't come up a better solution.


Motivation

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I have updated the docs for this feature
  • Yes, I ran pre-commit run -a with this PR

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

kbumsik added 2 commits April 3, 2023 17:10
Currently cert-manager with GitOps config has the two issues:

1. It does not install CA, whereas it is installed by default without GitOps
2. It does not support `cert_manager_install_letsencrypt_issuers` option.

To resolve the issue, I did the following:

1. Copy the [helm charts](1) to [eks-blueprints-add-ons](2) as-is.
2. Add additional configuration to support those two helm charts.

[1]: https://github.com/aws-ia/terraform-aws-eks-blueprints/tree/main/modules/kubernetes-addons/cert-manager
[2]: https://github.com/aws-samples/eks-blueprints-add-ons
The previous commit uses a complext object type to specify values for
a helm chart with multiple subcharts.

However this triggers Inconsistent conditional result types error like
following:

> Error: Inconsistent conditional result types
>   on .terraform/modules/eks.blueprints_kubernetes_addons/modules/kubernetes-addons/argocd/main.tf line 72, in resource "helm_release" "argocd_application":
>   72:       each.value.add_on_application ? var.addon_config : {}
>     ├────────────────
>     │ each.value.add_on_application is true
>     │ var.addon_config is object with 10 attributes
>
> The true and false result expressions must have consistent types. The
> 'true' value includes object attribute "awsEfsCsiDriver", which is absent
> in the 'false' value.

To workaround the issue I had to encode & decode the line causing the issue.
It doesn't look pretty but I don't come up a better solution.
@bryantbiggs
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cert manager cluster issuers not working
2 participants