-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated "Service Does Not Target Pod" for K8s
- Loading branch information
1 parent
f317e45
commit 61f6ad9
Showing
5 changed files
with
85 additions
and
73 deletions.
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
47 changes: 0 additions & 47 deletions
47
assets/queries/k8s/service_does_not_target_pod/test/positive.yaml
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
assets/queries/k8s/service_does_not_target_pod/test/positive1.yaml
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,27 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: helloworld2 | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: helloworld2 | ||
ports: | ||
- name: http | ||
nodePort: 30475 | ||
port: 9377 | ||
protocol: TCP | ||
targetPort: 9377 | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginx2 | ||
labels: | ||
app: hellowwwworld | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
ports: | ||
- containerPort: 9377 |
36 changes: 36 additions & 0 deletions
36
assets/queries/k8s/service_does_not_target_pod/test/positive2.yaml
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,36 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: helloworld3 | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: helloworld3 | ||
ports: | ||
- name: http | ||
nodePort: 30475 | ||
port: 9377 | ||
protocol: TCP | ||
targetPort: 9377 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-deployment | ||
labels: | ||
app: helloworld3 | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: helloworld3 | ||
template: | ||
metadata: | ||
labels: | ||
app: helloworld3 | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.14.2 | ||
ports: | ||
- containerPort: 80 |
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