Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

TT-8234 - fix overriding contextRef while updating policy spec#605

Merged
singhpr merged 13 commits intomasterfrom
fix/TT-8234/context-policy
Apr 11, 2023
Merged

TT-8234 - fix overriding contextRef while updating policy spec#605
singhpr merged 13 commits intomasterfrom
fix/TT-8234/context-policy

Conversation

@buraksekili
Copy link

@buraksekili buraksekili commented Apr 4, 2023

Description

Tyk Operator overrides contextRef field in SecurityPolicy spec during reconciliation. This PR fixes this bug and adds test cases to verify deleting either contextRef from SecurityPolicy or SecurityPolicy resource directly works properly.

Related Issue

https://tyktech.atlassian.net/browse/TT-8234

Motivation and Context

Test Coverage For This Change

Screenshots (if appropriate)

Types of changes

  • 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 change)

Checklist

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). If PRing from your fork, don't come from your master!
  • Make sure you are making a pull request against our master branch (left side). Also, it would be best if you started your change off our latest master.
  • Make sure you are updating CHANGELOG.md based on your changes.
  • My change requires a change to the documentation.
    • If you've changed APIs, describe what needs to be updated in the documentation.
  • I have updated the documentation accordingly.
  • If you've changed API models, please update CRDs.
    • make manifests
    • make helm
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Check your code additions will not fail linting checks:
    • gofmt -s -w .
    • go vet ./...
    • golangci-lint run

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
…sions

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
@buraksekili buraksekili marked this pull request as ready for review April 6, 2023 12:01
@buraksekili buraksekili requested a review from a team as a code owner April 6, 2023 12:01
@buraksekili buraksekili requested review from komalsukhani and removed request for a team April 6, 2023 12:01
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@singhpr singhpr merged commit d1f06f4 into master Apr 11, 2023
@singhpr singhpr deleted the fix/TT-8234/context-policy branch April 11, 2023 11:05
buger pushed a commit that referenced this pull request May 22, 2024
* WIP - don't override contextRef while updating policy spec

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* Update test cases

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* Add random names to policies

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* Fix linter issues

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* remove uuid from k8s metadata

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* replace fixed name based on the result of previous operation

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* Update logs command in Makefile.

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* Update gh workflow for testing

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* Add version check to prevent running policy tests in incompatible versions

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* Revert "Update gh workflow for testing"

This reverts commit 375faed.

* Update CHANGELOG.md

* Use all uuid in policy spec

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

* remove duplicated names in policy spec helper

Signed-off-by: Burak Sekili <buraksekili@gmail.com>

---------

Signed-off-by: Burak Sekili <buraksekili@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants