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

[feature] Add support for ignoring namespaces #139

Merged
merged 1 commit into from Aug 20, 2019

Conversation

@codenio
Copy link
Contributor

@codenio codenio commented Aug 2, 2019

ISSUE TYPE
  • Feature Pull Request
SUMMARY

This PR, (updated)

  • adds support for ignoring certain namespaces while watching all namespaces.
  • replaces Namespaces []string with Namespaces.Include []string
  • adds Namespaces.Ignore []string ( optional / omitempty ) filed to ignore namespaces when Namespaces.Inculde contains "all"
  • adds unit test cases for isNamespaceIgnored()

Fixes #128

This could allow as to watch all namespaces except a list of namespaces to ignore.

Example:

resources:
  - name: services
    namespaces:
      include:  
        - all
      ignore:
        - development
        - staging
    events:
      - create
      - delete
      - error

This config watches services of all namespaces except namespaces development and staging

@codenio codenio force-pushed the feature/ignore-namespaces branch from e09d097 to 907e427 Aug 2, 2019
@codenio
Copy link
Contributor Author

@codenio codenio commented Aug 2, 2019

rebased to develop

pkg/utils/utils.go Outdated Show resolved Hide resolved
pkg/utils/utils.go Outdated Show resolved Hide resolved
pkg/controller/controller.go Outdated Show resolved Hide resolved
pkg/utils/utils.go Outdated Show resolved Hide resolved
pkg/config/config.go Show resolved Hide resolved
pkg/utils/utils.go Outdated Show resolved Hide resolved
@codenio codenio force-pushed the feature/ignore-namespaces branch from 907e427 to 2e14225 Aug 2, 2019
@codenio
Copy link
Contributor Author

@codenio codenio commented Aug 2, 2019

resolved requested changes.

@sanketsudake sanketsudake requested a review from PrasadG193 Aug 2, 2019
@sanketsudake
Copy link
Member

@sanketsudake sanketsudake commented Aug 2, 2019

Changes looks good to me. Please wait for review from @PrasadG193

pkg/controller/controller.go Outdated Show resolved Hide resolved
@codenio codenio force-pushed the feature/ignore-namespaces branch from 2e14225 to 9c40e62 Aug 8, 2019
@codenio
Copy link
Contributor Author

@codenio codenio commented Aug 8, 2019

Rebased to develop

@codenio codenio force-pushed the feature/ignore-namespaces branch from 9c40e62 to 2f9ba7d Aug 9, 2019
@codenio
Copy link
Contributor Author

@codenio codenio commented Aug 9, 2019

rebased onto develop

@codenio codenio force-pushed the feature/ignore-namespaces branch from 2f9ba7d to affb649 Aug 17, 2019
@codenio
Copy link
Contributor Author

@codenio codenio commented Aug 17, 2019

rebased onto develop and made required changes.
@sanketsudake and @PrasadG193, we could review this and get this merged.

@codenio codenio force-pushed the feature/ignore-namespaces branch 2 times, most recently from dc69973 to baf1fa9 Aug 17, 2019
@codenio codenio force-pushed the feature/ignore-namespaces branch from baf1fa9 to 6874ae2 Aug 18, 2019
@codenio
Copy link
Contributor Author

@codenio codenio commented Aug 18, 2019

rebased onto develop

This Commit,
- adds support for ignoring certain namespaces while watching all namespaces using `IgnoreNamespaceChecker`
- replaces `Namespaces []string` with `Namespaces.Include []string`
- adds `Namespaces.Ignore []string` ( optional / omitempty ) filed to ignore namespaces when Namespaces.Inculde contains "all"
- adds unit test cases for isNamespaceIgnored()
@codenio codenio force-pushed the feature/ignore-namespaces branch from 6874ae2 to fc69907 Aug 20, 2019
@codenio
Copy link
Contributor Author

@codenio codenio commented Aug 20, 2019

rebased onto develop.

@PrasadG193 PrasadG193 merged commit 964cff5 into infracloudio:develop Aug 20, 2019
1 check passed
@PrasadG193
Copy link
Member

@PrasadG193 PrasadG193 commented Aug 20, 2019

Merged. Thanks @aananthraj

@codenio codenio deleted the feature/ignore-namespaces branch Aug 20, 2019
@codenio
Copy link
Contributor Author

@codenio codenio commented Aug 20, 2019

@PrasadG193 thanks 👍

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

Successfully merging this pull request may close these issues.

3 participants