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 Compare August 2, 2019 05:33
@codenio
Copy link
Contributor Author

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 Compare August 2, 2019 14:12
@codenio
Copy link
Contributor Author

codenio commented Aug 2, 2019

resolved requested changes.

@sanketsudake sanketsudake requested a review from PrasadG193 August 2, 2019 15:40
@sanketsudake
Copy link
Contributor

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

@codenio codenio force-pushed the feature/ignore-namespaces branch from 2e14225 to 9c40e62 Compare August 8, 2019 13:02
@codenio
Copy link
Contributor Author

codenio commented Aug 8, 2019

Rebased to develop

@codenio codenio force-pushed the feature/ignore-namespaces branch from 9c40e62 to 2f9ba7d Compare August 9, 2019 11:05
@codenio
Copy link
Contributor Author

codenio commented Aug 9, 2019

rebased onto develop

@codenio codenio force-pushed the feature/ignore-namespaces branch from 2f9ba7d to affb649 Compare August 17, 2019 05:21
@codenio
Copy link
Contributor Author

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 Compare August 17, 2019 06:26
@codenio codenio force-pushed the feature/ignore-namespaces branch from baf1fa9 to 6874ae2 Compare August 18, 2019 16:15
@codenio
Copy link
Contributor Author

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 Compare August 20, 2019 06:39
@codenio
Copy link
Contributor Author

codenio commented Aug 20, 2019

rebased onto develop.

@PrasadG193 PrasadG193 merged commit 964cff5 into kubeshop:develop Aug 20, 2019
@PrasadG193
Copy link
Collaborator

Merged. Thanks @aananthraj

@codenio codenio deleted the feature/ignore-namespaces branch August 20, 2019 08:27
@codenio
Copy link
Contributor Author

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
Development

Successfully merging this pull request may close these issues.

Exclude or Ignore Namespaces
3 participants