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

--default-ssl-certificate flag for via CRD #160

Merged
merged 24 commits into from
Feb 2, 2024

Conversation

aamgayle
Copy link
Contributor

Description

Added functionality to use the --default-ssl-certificate flag via the CRD.
The defaultSSLCerfiticate field has a secret field with secretName and secretNamespace properties. From here it enters these in namespace/name format into the --default-ssl-certificate command line command and sets the default ssl certificate for the default HTTPS server

Fixes # (issue)
Feature # (details)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Is it a breaking change which will impact consuming tool(s)?

  • Unit Tests
  • e2e Tests

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

aamgayle and others added 11 commits January 30, 2024 12:08
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.12.0 to 0.17.0.
- [Commits](golang/crypto@v0.12.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver King <[email protected]>
crd update

temp unit test change

fixed DefaultSSLCert in nginx test

Changed check for empty defaulsslcert

reverting unit test yaml

Removed optional from Secret fields

change sslSecret to secret
@aamgayle aamgayle changed the title Aamgayle/defaultsslcertargcopy --default-ssl-certificate flag for via CRD Jan 30, 2024
@aamgayle aamgayle marked this pull request as ready for review January 30, 2024 17:48
@coveralls
Copy link
Collaborator

coveralls commented Jan 30, 2024

Pull Request Test Coverage Report for Build 7758505383

  • -28 of 52 (46.15%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 81.252%

Changes Missing Coverage Covered Lines Changed/Added Lines %
api/v1alpha1/zz_generated.deepcopy.go 1 29 3.45%
Totals Coverage Status
Change from base Build 7747450632: -0.7%
Covered Lines: 2557
Relevant Lines: 3147

💛 - Coveralls

Copy link
Collaborator

@OliverMKing OliverMKing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good approach! Just left a few comments.

api/v1alpha1/nginxingresscontroller_types.go Outdated Show resolved Hide resolved
api/v1alpha1/nginxingresscontroller_types.go Outdated Show resolved Hide resolved
api/v1alpha1/nginxingresscontroller_types.go Outdated Show resolved Hide resolved
pkg/controller/nginxingress/nginx_ingress_controller.go Outdated Show resolved Hide resolved
pkg/manifests/nginx.go Outdated Show resolved Hide resolved
pkg/manifests/nginx.go Outdated Show resolved Hide resolved
@aamgayle aamgayle requested a review from OliverMKing January 30, 2024 20:06
OliverMKing
OliverMKing previously approved these changes Jan 31, 2024
@aamgayle
Copy link
Contributor Author

aamgayle commented Feb 1, 2024

/ok-to-test sha=9374b59

@aamgayle
Copy link
Contributor Author

aamgayle commented Feb 1, 2024

/ok-to-test sha=7614337

@aamgayle
Copy link
Contributor Author

aamgayle commented Feb 1, 2024

/ok-to-test sha=a3b7596

OliverMKing
OliverMKing previously approved these changes Feb 1, 2024
@Tatsinnit Tatsinnit added the enhancement New feature or request label Feb 1, 2024
@OliverMKing
Copy link
Collaborator

/ok-to-test sha=a3b7596

bfoley13
bfoley13 previously approved these changes Feb 2, 2024
Copy link
Member

@bfoley13 bfoley13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clean, LGTM!

@aamgayle aamgayle dismissed stale reviews from bfoley13 and OliverMKing via 7eff4ed February 2, 2024 16:07
@aamgayle
Copy link
Contributor Author

aamgayle commented Feb 2, 2024

/ok-to-test sha=7eff4ed

@OliverMKing
Copy link
Collaborator

OliverMKing commented Feb 2, 2024

/ok-to-test sha=7eff4ed

1 similar comment
@OliverMKing
Copy link
Collaborator

/ok-to-test sha=7eff4ed

@OliverMKing OliverMKing merged commit 19d3fd0 into Azure:main Feb 2, 2024
9 checks passed
@MXClyde
Copy link

MXClyde commented Mar 12, 2024

@OliverMKing Is there a way to trigger receiving this enhancement in an active AKS cluster? It seems like it isn't live yet (at least in West Europe region), as i'm getting an unknown field error when trying to apply the setting...

@OliverMKing
Copy link
Collaborator

@OliverMKing Is there a way to trigger receiving this enhancement in an active AKS cluster? It seems like it isn't live yet (at least in West Europe region), as i'm getting an unknown field error when trying to apply the setting...

This will be released shortly. It's not released yet but I'll let you know when it is.

It will be part of the AKS release notes when it is

@MXClyde
Copy link

MXClyde commented Jun 5, 2024

@OliverMKing I see the new version appeared on the AKS release notes but I cannot get it working on a newly deployed cluster (in a region that has the new version according to the release tracker). Is below syntax correct?

apiVersion: approuting.kubernetes.azure.com/v1alpha1
kind: NginxIngressController
metadata:
  name: default
  namespace: app-routing-namespace
spec:
  ingressClassName: webapprouting.kubernetes.azure.com
  controllerNamePrefix: nginx
  defaultSSLCertificate: "mendix/wildcard-tls-cert"

@OliverMKing
Copy link
Collaborator

@OliverMKing I see the new version appeared on the AKS release notes but I cannot get it working on a newly deployed cluster (in a region that has the new version according to the release tracker). Is below syntax correct?

This should be documented in release notes, but it will only be available on clusters with k8s versions 1.30 and up. This is due to AKS addon breaking change policies.

@sabbour for visibility.

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

Successfully merging this pull request may close these issues.

6 participants