Created
September 8, 2023 08:59
-
-
Save erdii/275a49202998046a59d09375b3ae4e3e to your computer and use it in GitHub Desktop.
Quick and dirty exposed http proxy in openshift
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
apiVersion: route.openshift.io/v1 | |
kind: Route | |
metadata: | |
name: proxy | |
namespace: default | |
spec: | |
to: | |
kind: Service | |
name: proxy | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: proxy | |
namespace: default | |
spec: | |
selector: | |
app.kubernetes.io/name: http-proxy | |
ports: | |
- name: proxy | |
port: 8080 | |
targetPort: 8080 | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: proxy | |
namespace: default | |
labels: | |
app.kubernetes.io/name: http-proxy | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app.kubernetes.io/name:http-proxy | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app.kubernetes.io/name: http-proxy | |
spec: | |
securityContext: | |
runAsNonRoot: false | |
seccompProfile: | |
type: RuntimeDefault | |
containers: | |
- name: proxy | |
image: quay.io/erdii-test/test-proxy:v0.0.3 | |
ports: | |
- name: proxy | |
containerPort: 8080 | |
resources: | |
limits: | |
cpu: 100m | |
memory: 100Mi | |
requests: | |
cpu: 100m | |
memory: 100Mi | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: NetworkPolicy | |
metadata: | |
name: proxy-allow-all-egress | |
namespace: default | |
spec: | |
podSelector: | |
matchLabels: | |
app.kubernetes.io/name: app.kubernetes.io/name: http-proxy | |
policyTypes: | |
- Egress | |
egress: | |
- {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment