-
Notifications
You must be signed in to change notification settings - Fork 115
Gangams/rs hyper scale 2022 ready #753
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
Merged
Merged
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
95f5b65
watch and multiproc implementation
ganga1980 30decbb
fix weird bug
ganga1980 540ca90
multiproc support for fluentd
ganga1980 be3436e
working
ganga1980 c8ca6e5
fix log lines
ganga1980 6bee954
refactor code
ganga1980 0593d02
cache telemetry
ganga1980 3f11a27
nodecount telemetry
ganga1980 3752459
bug fix
ganga1980 694bbc0
further optimize
ganga1980 ac88379
bugfix related typo
ganga1980 5835f42
node allocatable cache
ganga1980 12f9754
wincontainerinventory in multiproc
ganga1980 5da266f
disable health
ganga1980 658a440
config events on different core
ganga1980 b8b8d18
add ts to logs
ganga1980 6cf9c11
move kube perf records to separate plugin
ganga1980 9f08cb0
refactor
ganga1980 056ea8b
minor update
ganga1980 b62cf5c
merge latest ci_dev changes
ganga1980 b940e45
remove commented code
ganga1980 cf5495d
Merge branch 'ci_dev' into gangams/rs-hyper-scale-2022
ganga1980 3a0cff2
mdm state file
ganga1980 a0e4498
mdm state file
ganga1980 de4f4b5
podmdm to separate plugin
ganga1980 4ea1d69
bug fixes
ganga1980 45d3e03
bug fixes
ganga1980 5481e48
bug fixes
ganga1980 1ea9366
podmdm plugin
ganga1980 a12e535
bug fixes
ganga1980 03e0b43
bug fixes
ganga1980 ab27436
remove unneeded log lines
ganga1980 541e50d
more improvements
ganga1980 589b69a
clean up
ganga1980 37d67b8
clean up
ganga1980 886557b
add requestId header for mdm metrics
ganga1980 c594c5a
latest mdsd and fix for threading issue in out mdm
ganga1980 0297f7b
rs specific config for large cluster
ganga1980 89a96da
optimize out mdm
ganga1980 a6d04c5
bug fix
ganga1980 4c4d2e6
use large queue limit for kube perf
ganga1980 333cd80
5k preview rs limits
ganga1980 fb57c3c
handle resourceversion empty or 0 scenrio
ganga1980 86f088e
handle pagination api call failures
ganga1980 351f0ff
fix bug
ganga1980 497bce4
preview image for internal customer validation
ganga1980 911be7e
preview image
ganga1980 cec11dd
wip
ganga1980 3d092c8
wip
ganga1980 933f2a3
fix trailing whitespaces
ganga1980 223fab2
merge latest ci_dev changes
ganga1980 3047e76
fix bug
ganga1980 e706fee
remove unused envvars in yaml
ganga1980 1ac6672
revert minor things
ganga1980 4bb069e
telemetry tags for preview release
ganga1980 71b56e1
Merge branch 'ci_dev' into gangams/rs-hyper-scale-2022-ready
ganga1980 1262c8a
revert preview image tags
ganga1980 5a67c0c
revert unintended change
ganga1980 f019779
merge latest dev changes
ganga1980 c2b341f
Merge branch 'ci_dev' into gangams/rs-hyper-scale-2022-ready
ganga1980 3f2e05f
fix bug
ganga1980 7dad848
use same batchtime for both mdm & podinventory records
ganga1980 f49dffd
use same batchtime for both mdm & podinventory records
ganga1980 f4824b2
use same batchtime for both mdm & podinventory records
ganga1980 ab3b042
use same batchtime for both mdm & podinventory records
ganga1980 b8b0732
Merge branch 'ci_dev' into gangams/rs-hyper-scale-2022-ready
ganga1980 e39a120
preview image tag with latest ci_dev changes
ganga1980 d7d4402
merge latest ci_dev changes
ganga1980 76f2165
Merge branch 'ci_dev' into gangams/rs-hyper-scale-2022-ready
ganga1980 484ba94
Merge branch 'ci_dev' into gangams/rs-hyper-scale-2022-ready
ganga1980 cae999b
change back to use prod image in docker files
ganga1980 b4e5427
fix unit test failures
ganga1980 81eec6e
exclude unfixed cve until this get fixed
ganga1980 1a3fa0e
fix minor issue
ganga1980 e4ca00a
Merge branch 'ci_dev' into gangams/rs-hyper-scale-2022-ready
ganga1980 7f3372a
increase retries to handle transient errors
ganga1980 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| #!/usr/local/bin/ruby | ||
| # frozen_string_literal: true | ||
|
|
||
| require "net/http" | ||
| require "net/https" | ||
| require "yajl/json_gem" | ||
| require "logger" | ||
| require "time" | ||
|
|
||
| WATCH_ARGUMENTS = { | ||
| "labelSelector" => :label_selector, | ||
| "fieldSelector" => :field_selector, | ||
| "resourceVersion" => :resource_version, | ||
| "allowWatchBookmarks" => :allow_watch_bookmarks, | ||
| "timeoutSeconds" => :timeout_seconds, | ||
| }.freeze | ||
|
|
||
| # HTTP Stream used to watch changes on entities | ||
| class WatchStream | ||
| def initialize(uri, http_options, http_headers, logger) | ||
| @uri = uri | ||
| @http_client = nil | ||
| @http_options = http_options | ||
| @http_headers = http_headers | ||
| @logger = logger | ||
| @path = "" | ||
| @logger.info "WatchStream::initialize @ #{Time.now.utc.iso8601}" | ||
| end | ||
|
|
||
| def each | ||
| @finished = false | ||
| buffer = +"" | ||
| @logger.info "WatchStream::each:Opening TCP session @ #{Time.now.utc.iso8601}" | ||
| @http_client = Net::HTTP.start(@uri.host, @uri.port, @http_options) | ||
| if @http_client.nil? | ||
| raise "WatchStream::each:Failed to create HTTPClient object @ #{Time.now.utc.iso8601}" | ||
| end | ||
| @path = @uri.path | ||
| if @path.nil? || @path.empty? | ||
| raise "WatchStream::each:URI path should not be empty or nil @ #{Time.now.utc.iso8601}" | ||
| end | ||
| if !@uri.query.nil? && !@uri.query.empty? | ||
| @path += "?" + @uri.query | ||
| end | ||
| @logger.info "WatchStream::each:Making GET API call for Watch with path: #{@path} @ #{Time.now.utc.iso8601}" | ||
| @http_client.request_get(@path, @http_headers) do |response| | ||
| if !response.nil? && response.code.to_i > 300 | ||
| raise "WatchStream::each:Watch connection of the path: #{@path} failed with an http status code: #{response.code} @ #{Time.now.utc.iso8601}" | ||
| end | ||
| response.read_body do |chunk| | ||
| buffer << chunk | ||
| while (line = buffer.slice!(/.+\n/)) | ||
| yield(Yajl::Parser.parse(StringIO.new(line.chomp))) | ||
| end | ||
| end | ||
| end | ||
| rescue => e | ||
| raise e | ||
| end | ||
|
|
||
| def finish | ||
| begin | ||
| @finished = true | ||
| @logger.info "WatchStream::finish:Closing HTTP session of the path:#{@path} @ #{Time.now.utc.iso8601}" | ||
| @http_client.finish if !@http_client.nil? && @http_client.started? | ||
| rescue => error | ||
| @logger.warn "WatchStream::finish:Closing of HTTP session of the path: #{@path} failed with an error: #{error} @ #{Time.now.utc.iso8601}" | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.