kompose/script/test/fixtures/configmap-pod/output-os.yaml
Charlie Drage 55b077ab04
cleanup: removes uneeded annotation when not using network policy (#1884)
#### What type of PR is this?

<!--
Add one of the following kinds:
/kind bug
/kind documentation
/kind feature
-->

/kind cleanup

#### What this PR does / why we need it:

Removes the network policy annotation which is not needed (we are not
generating network policy)

#### Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes https://github.com/kubernetes/kompose/issues/1759

#### Special notes for your reviewer:
2024-06-02 20:46:57 +02:00

70 lines
1.2 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: redis
name: redis
spec:
ports:
- name: "6379"
port: 6379
targetPort: 6379
selector:
io.kompose.service: redis
type: NodePort
---
apiVersion: v1
kind: Pod
metadata:
labels:
io.kompose.service: redis
name: redis
spec:
containers:
- env:
- name: ALLOW_EMPTY_PASSWORD
valueFrom:
configMapKeyRef:
key: ALLOW_EMPTY_PASSWORD
name: foo-env
- name: BAR
valueFrom:
configMapKeyRef:
key: BAR
name: bar-env
- name: FOO
valueFrom:
configMapKeyRef:
key: FOO
name: bar-env
image: bitnami/redis:latest
name: redis
ports:
- containerPort: 6379
protocol: TCP
restartPolicy: Never
---
apiVersion: v1
data:
ALLOW_EMPTY_PASSWORD: "yes"
kind: ConfigMap
metadata:
labels:
io.kompose.service: redis-foo-env
name: foo-env
---
apiVersion: v1
data:
BAR: FOO
FOO: BAR
kind: ConfigMap
metadata:
labels:
io.kompose.service: redis-bar-env
name: bar-env