Skip to content

Commit

Permalink
kubernetes-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexiv90 committed Dec 22, 2023
1 parent 5877935 commit d7fc37a
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 0 deletions.
15 changes: 15 additions & 0 deletions kubernetes/ansible/ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[defaults]
inventory = ./inventory.yc_compute.yml
remote_user = ubuntu
private_key_file = ~/.ssh/yc
host_key_checking = False
retry_files_enabled = False

inventory_plugins=./plugins/inventory

[inventory]
enable_plugins = yc_compute

[diff]
always = True
context = 5
19 changes: 19 additions & 0 deletions kubernetes/ansible/inventory.yc_compute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
plugin: yc_compute
folders:
- b1gk62ipniaqhnvrgv06
filters:
- status == 'RUNNING'
hostnames:
- "{{ name }}"
auth_kind: serviceaccountfile
service_account_file: /home/sa/secrets/key.json

compose:
ansible_host: network_interfaces[0].primary_v4_address.one_to_one_nat.address

# keyed_groups:
# - key: labels['tags']
groups:
master: labels['tags'] == 'master-node'
worker: labels['tags'] == 'worker-node'
18 changes: 18 additions & 0 deletions kubernetes/reddit/comment-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: comment-deployment
spec:
replicas: 1
selector:
matchLabels:
app: comment
template:
metadata:
name: comment
labels:
app: comment
spec:
containers:
- image: alexiv90/comment
name: comment
18 changes: 18 additions & 0 deletions kubernetes/reddit/mongo-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongo-deployment
spec:
replicas: 1
selector:
matchLabels:
app: mongo
template:
metadata:
name: mongo
labels:
app: mongo
spec:
containers:
- image: alexiv90/mongo
name: mongo
18 changes: 18 additions & 0 deletions kubernetes/reddit/post-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: post-deployment
spec:
replicas: 1
selector:
matchLabels:
app: post
template:
metadata:
name: post
labels:
app: post
spec:
containers:
- image: alexiv90/post
name: post
18 changes: 18 additions & 0 deletions kubernetes/reddit/ui-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ui-deployment
spec:
replicas: 1
selector:
matchLabels:
app: ui
template:
metadata:
name: ui
labels:
app: ui
spec:
containers:
- image: alexiv90/ui
name: ui
Binary file added minikube-linux-amd64
Binary file not shown.

0 comments on commit d7fc37a

Please sign in to comment.