-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#### What type of PR is this? <!-- Add one of the following kinds: /kind bug /kind cleanup /kind documentation /kind feature --> #### What this PR does / why we need it: When supplying a label in the compose file, it should stay in the output too. #### 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 #1885 #### Special notes for your reviewer: Signed-off-by: Charlie Drage <[email protected]>
- Loading branch information
Showing
4 changed files
with
72 additions
and
14 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
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,7 @@ | ||
services: | ||
app: | ||
image: node:18-alpine | ||
ports: | ||
- 3000:3000 | ||
labels: | ||
- "com.example.label=foo" |
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,47 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
com.example.label: foo | ||
labels: | ||
io.kompose.service: app | ||
name: app | ||
spec: | ||
ports: | ||
- name: "3000" | ||
port: 3000 | ||
targetPort: 3000 | ||
selector: | ||
io.kompose.service: app | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
com.example.label: foo | ||
labels: | ||
io.kompose.service: app | ||
name: app | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
io.kompose.service: app | ||
template: | ||
metadata: | ||
annotations: | ||
com.example.label: foo | ||
labels: | ||
io.kompose.network/label-default: "true" | ||
io.kompose.service: app | ||
spec: | ||
containers: | ||
- image: node:18-alpine | ||
name: app | ||
ports: | ||
- containerPort: 3000 | ||
protocol: TCP | ||
restartPolicy: Always | ||
|