-
Notifications
You must be signed in to change notification settings - Fork 42
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
Initial import #1
Merged
Merged
Changes from all commits
Commits
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
This file contains 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,22 @@ | ||
# IDEs | ||
/.vscode | ||
/.settings | ||
*.swp | ||
.vimrc | ||
.DS_Store | ||
.idea | ||
*.go~ | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
This file contains 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,8 @@ | ||
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.12 AS builder | ||
WORKDIR /go/src/github.com/openshift/debug-network | ||
COPY . . | ||
ENV GO_PACKAGE github.com/openshift/debug-network | ||
|
||
FROM registry.svc.ci.openshift.org/openshift/origin-v4.0:cli | ||
COPY --from=builder /go/src/github.com/openshift/debug-network/debug-scripts/* /usr/bin/ | ||
|
This file contains 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,8 @@ | ||
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.12 AS builder | ||
WORKDIR /go/src/github.com/openshift/debug-network | ||
COPY . . | ||
ENV GO_PACKAGE github.com/openshift/debug-network | ||
|
||
FROM registry.svc.ci.openshift.org/ocp/4.6:cli | ||
COPY --from=builder /go/src/github.com/openshift/debug-network/debug-scripts/* /usr/bin/ | ||
RUN yum -y install jq tcpdump traceroute net-tools nmap-ncat pciutils strace numactl; yum clean all |
This file contains 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,17 @@ | ||
all: images | ||
.PHONY: all | ||
|
||
# Include the library makefile | ||
include $(addprefix ./vendor/github.com/openshift/library-go/alpha-build-machinery/make/, \ | ||
targets/openshift/images.mk \ | ||
) | ||
|
||
IMAGE_REGISTRY :=registry.svc.ci.openshift.org | ||
|
||
# This will call a macro called "build-image" which will generate image specific targets based on the parameters: | ||
# $0 - macro name | ||
# $1 - target name | ||
# $2 - image ref | ||
# $3 - Dockerfile path | ||
# $4 - context directory for image build | ||
$(call build-image,ocp-debug-network,$(IMAGE_REGISTRY)/ocp/4.6:ocp-debug-network, ./Dockerfile.rhel7,.) |
This file contains 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,4 @@ | ||
reviewers: | ||
- rcarrillocruz | ||
approvers: | ||
- rcarrillocruz |
This file contains 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,11 @@ | ||
debug-network | ||
============= | ||
|
||
`openshift-debug-network` is a tool for debugging network. | ||
The directory structure, as well as specific details behind this tool can be found [in this enhancement](https://github.com/openshift/enhancements/blob/master/enhancements/oc/debug-network.md). | ||
|
||
## Debugging Scripts | ||
Debugging scripts are kept in `./debug-scripts`. The content of that folder is placed in `/usr/bin` in the image. | ||
The debug network scripts should only include debug logic for OpenShift Networking. | ||
Outside components are encouraged to produce a similar "debug-network" image, but this is not the spot to be | ||
included. |
This file contains 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,4 @@ | ||
reviewers: | ||
- rcarrillocruz | ||
approvers: | ||
- rcarrillocruz |
This file contains 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,7 @@ | ||
#!/bin/bash | ||
|
||
# generate /debug-network/version file | ||
. version | ||
echo "openshift/debug-network" > /debug-network/version | ||
version >> /debug-networking/version | ||
|
This file contains 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,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
function version() { | ||
# get version from image | ||
version=$( \ | ||
oc status | grep '^pod' | \ | ||
sed -n -r -e 's/.*([[:digit:]]+\.[[:digit:]]+(:?\.[[:digit:]])?(:?-[^@]+)?).*/\1/p' \ | ||
) | ||
|
||
# if version not found, fallback to imageID | ||
[ -z "${version}" ] && version=$(oc status | grep '^pod.*runs' | sed -r -e 's/^pod.*runs //') | ||
|
||
# if version still not found, use Unknown | ||
[ -z "${version}" ] && version="Unknown" | ||
|
||
echo ${version} | ||
} |
This file contains 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,25 @@ | ||
module github.com/openshift/debug-networking | ||
|
||
go 1.14 | ||
|
||
require ( | ||
github.com/Microsoft/hcsshim v0.8.9 // indirect | ||
github.com/containerd/containerd v1.4.0 // indirect | ||
github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe // indirect | ||
github.com/containers/storage v1.23.4 // indirect | ||
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible // indirect | ||
github.com/fsouza/go-dockerclient v1.6.5 // indirect | ||
github.com/golang/protobuf v1.4.2 // indirect | ||
github.com/opencontainers/image-spec v1.0.1 // indirect | ||
github.com/openshift/imagebuilder v1.1.6 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 // indirect | ||
github.com/sirupsen/logrus v1.6.0 // indirect | ||
golang.org/x/net v0.0.0-20200904194848-62affa334b73 // indirect | ||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 // indirect | ||
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f // indirect | ||
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d // indirect | ||
google.golang.org/grpc v1.31.1 // indirect | ||
google.golang.org/protobuf v1.25.0 // indirect | ||
k8s.io/klog v1.0.0 // indirect | ||
) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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,7 @@ | ||
// *build tools | ||
|
||
package tools | ||
|
||
import ( | ||
_ "github.com/openshift/library-go/alpha-build-machinery" | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
Networking plugins that are developed as part of OpenShift
.