-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update structure and adds new configurations
- Loading branch information
Salih Bozkaya
authored and
Salih Bozkaya
committed
Dec 4, 2024
1 parent
fb62b4e
commit 4d59588
Showing
8 changed files
with
108 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: myapp-staging | ||
namespace: argocd | ||
finalizers: | ||
- resources-finalizer.argocd.argoproj.io | ||
spec: | ||
project: default | ||
source: | ||
repoURL: https://github.com/rsship/argomaton.git | ||
targetRevision: HEAD | ||
path: envs/staging/myapp | ||
destination: | ||
server: https://kubernetes.default.svc | ||
syncPolicy: | ||
automated: | ||
prune: true | ||
selfHeal: true | ||
allowEmpty: false | ||
syncOptions: | ||
- Validate=true | ||
- CreateNamespace=false | ||
- PrunePropagationPolicy=foreground | ||
- PruneLast=true |
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,26 @@ | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: secondapp-production | ||
namespace: argocd | ||
finalizers: | ||
- resources-finalizer.argocd.argoproj.io | ||
spec: | ||
project: default | ||
source: | ||
repoURL: https://github.com/rsship/argomaton.git | ||
targetRevision: HEAD | ||
path: envs/staging/second-app | ||
destination: | ||
server: https://kubernetes.default.svc | ||
syncPolicy: | ||
automated: | ||
prune: true | ||
selfHeal: true | ||
allowEmpty: false | ||
syncOptions: | ||
- Validate=true | ||
- CreateNamespace=false | ||
- PrunePropagationPolicy=foreground | ||
- PruneLast=true |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: foo | ||
name: staging |
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,5 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: production |
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,23 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx | ||
namespace: production | ||
labels: | ||
app: nginx | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: salihbozkaya1001/nginx:0.0.2 | ||
ports: | ||
- containerPort: 80 |
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,26 @@ | ||
#!/bin/sh | ||
|
||
set -xe | ||
|
||
new_ver=$1 | ||
|
||
echo "New version $1" | ||
|
||
docker tag nginx salihbozkaya1001/nginx:$new_ver | ||
|
||
docker push salihbozkaya1001/nginx:$new_ver | ||
|
||
tmp_dir=$(mktemp -d) | ||
echo $tmp_dir | ||
|
||
git clone git@github.com:rsship/argomaton.git $tmp_dir | ||
|
||
sed -i '' -e "s/salihbozkaya1001\/nginx:.*/salihbozkaya1001\/nginx:$new_ver/g" $tmp_dir/myapp/1-deployment.yaml | ||
|
||
cd $tmp_dir | ||
git add . | ||
git commit -m "Update Image $new_ver" | ||
git push | ||
|
||
rm -rf $tmp_dir | ||
|