-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SSA upstream bugs for Kubernetes < 1.22
Signed-off-by: Stefan Prodan <[email protected]>
- Loading branch information
1 parent
6c1a229
commit 4b0783c
Showing
4 changed files
with
260 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ go 1.16 | |
|
||
require ( | ||
github.com/google/go-cmp v0.5.6 | ||
k8s.io/api v0.22.2 | ||
k8s.io/apimachinery v0.22.2 | ||
// pin cli-utils to avoid [email protected]+incompatible dependency in v0.25.0 | ||
sigs.k8s.io/cli-utils v0.25.1-0.20210608181808-f3974341173a | ||
|
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
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,102 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: "%[1]s" | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: "%[1]s" | ||
namespace: "%[1]s" | ||
spec: | ||
minReadySeconds: 3 | ||
revisionHistoryLimit: 5 | ||
progressDeadlineSeconds: 60 | ||
strategy: | ||
rollingUpdate: | ||
maxUnavailable: 0 | ||
type: RollingUpdate | ||
selector: | ||
matchLabels: | ||
app: "%[1]s" | ||
template: | ||
metadata: | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
prometheus.io/port: "9797" | ||
labels: | ||
app: "%[1]s" | ||
spec: | ||
containers: | ||
- name: podinfod | ||
image: ghcr.io/stefanprodan/podinfo:6.0.0 | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- name: http | ||
containerPort: 9898 | ||
# associative list with keys has an element that omits key field "protocol" | ||
#protocol: TCP | ||
- name: http-metrics | ||
containerPort: 9797 | ||
#protocol: TCP | ||
- name: grpc | ||
containerPort: 9999 | ||
#protocol: TCP | ||
command: | ||
- ./podinfo | ||
- --port=9898 | ||
- --port-metrics=9797 | ||
- --grpc-port=9999 | ||
- --grpc-service-name=podinfo | ||
- --level=info | ||
- --random-delay=false | ||
- --random-error=false | ||
env: | ||
- name: PODINFO_UI_COLOR | ||
value: "#34577c" | ||
livenessProbe: | ||
exec: | ||
command: | ||
- podcli | ||
- check | ||
- http | ||
- localhost:9898/healthz | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 5 | ||
readinessProbe: | ||
exec: | ||
command: | ||
- podcli | ||
- check | ||
- http | ||
- localhost:9898/readyz | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 5 | ||
resources: | ||
limits: | ||
# expected string, got &value.valueUnstructured{Value:2} | ||
cpu: 2 | ||
memory: 512Mi | ||
requests: | ||
cpu: 1 | ||
memory: 64Mi | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: "%[1]s" | ||
namespace: "%[1]s" | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: "%[1]s" | ||
ports: | ||
- name: http | ||
port: 9898 | ||
# .spec.ports: element 0: associative list with keys has an element that omits key field "protocol" | ||
#protocol: TCP | ||
targetPort: http | ||
- port: 9999 | ||
targetPort: grpc | ||
#protocol: TCP | ||
name: grpc |
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