-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a19dd6f
commit eb3fac0
Showing
6 changed files
with
143 additions
and
101 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
FROM registry.fedoraproject.org/fedora:31 | ||
|
||
RUN dnf install -y acl attr basesystem bash file pciutils which time \ | ||
bind-utils iproute tcpdump nmap-ncat \ | ||
bc bzip2 gnupg2 htop less lsof procps-ng psmisc strace sudo \ | ||
tar tree unzip vim-enhanced \ | ||
sway \ | ||
xorg-x11-xauth xorg-x11-drv-vesa xorg-x11-drv-evdev \ | ||
xorg-x11-drv-fbdev xorg-x11-drv-intel xorg-x11-drv-libinput \ | ||
xorg-x11-drv-qxl xorg-x11-drv-vesa xorg-x11-utils xorg-x11-xkb-utils \ | ||
xterm xorg-x11-server-Xspice xorg-x11-twm \ | ||
kubernetes-client | ||
|
||
# Fix Xorg startup issue | ||
RUN bash -c "echo allowed_users = anybody > /etc/X11/Xwrapper.config" | ||
|
||
# Ensure unprivileged user has environment | ||
RUN useradd -u 1000 -m fedora && \ | ||
mkdir -p /run/user/1000 && chown 1000:1000 /run/user/1000 && \ | ||
mkdir -p /run/user/0 && chown 0:0 /run/user/0 | ||
|
||
COPY tools/* /bin/ |
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 @@ | ||
Test deployment with basic objects |
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,10 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test | ||
spec: | ||
restartPolicy: Never | ||
containers: | ||
- name: test | ||
image: fedora | ||
command: ["/bin/sleep", "Inf"] |
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,89 @@ | ||
apiVersion: v1 | ||
items: | ||
- apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: postgres | ||
app.kubernetes.io/instance: demo | ||
app.kubernetes.io/name: demo | ||
app.kubernetes.io/part-of: app | ||
name: postgres | ||
spec: | ||
ports: | ||
- name: pg | ||
port: 5432 | ||
protocol: TCP | ||
targetPort: pg | ||
selector: | ||
app.kubernetes.io/component: postgres | ||
app.kubernetes.io/instance: demo | ||
app.kubernetes.io/name: demo | ||
app.kubernetes.io/part-of: app | ||
type: ClusterIP | ||
- apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: postgres | ||
app.kubernetes.io/instance: demo | ||
app.kubernetes.io/name: demo | ||
app.kubernetes.io/part-of: app | ||
name: demo-postgres | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: postgres | ||
app.kubernetes.io/instance: demo | ||
app.kubernetes.io/name: demo | ||
app.kubernetes.io/part-of: app | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: postgres | ||
app.kubernetes.io/instance: demo | ||
app.kubernetes.io/name: demo | ||
app.kubernetes.io/part-of: app | ||
name: postgres | ||
spec: | ||
containers: | ||
- image: docker.io/library/postgres:12.1 | ||
name: postgres | ||
ports: | ||
- containerPort: 5432 | ||
name: pg | ||
- apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: worker | ||
app.kubernetes.io/instance: demo | ||
app.kubernetes.io/name: demo | ||
app.kubernetes.io/part-of: app | ||
name: demo-worker | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: worker | ||
app.kubernetes.io/instance: demo | ||
app.kubernetes.io/name: demo | ||
app.kubernetes.io/part-of: app | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: worker | ||
app.kubernetes.io/instance: demo | ||
app.kubernetes.io/name: demo | ||
app.kubernetes.io/part-of: app | ||
name: worker | ||
spec: | ||
containers: | ||
- args: | ||
- sh | ||
- "-c" | ||
- "python3 -c 'import socket, sys; socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((sys.argv[1], 5432))' postgres;echo Connected; sleep infinity" | ||
image: registry.fedoraproject.org/fedora:31 | ||
name: worker | ||
kind: List |