Skip to content

Commit

Permalink
Merge pull request #8 from globis-org/add/kustomize
Browse files Browse the repository at this point in the history
Kustomize 用の設定ファイルを追加する
  • Loading branch information
yukin01 authored Oct 23, 2023
2 parents ca1bdac + 32dcdc0 commit 8fe0854
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
# eks-ssm-agent-container
# eks-scripts
**注意: このリポジトリは、Public Repositoryです。機密情報は含めないでください。**

このリポジトリには、AWS Systems Managerエージェントをコンテナで実行するためのシェルスクリプトおよびDockerfileにおける使用例が含まれています。
## Kustomize

Kustomizeの共通設定を格納しています。

### Rollout Integration

RolloutをKustomizeに正しく認識させるための設定をcomponentsとして切り出しています。

```
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- rollout.yaml
components:
- https://github.com/globis-org/eks-scripts/kustomize/rollout-integration?ref=main
```

## SSM Agent

AWS Systems Managerエージェントをコンテナで実行するためのシェルスクリプトおよびDockerfileにおける使用例が含まれています。

これにより、AWS Systems Managerを使用してコンテナにアクセスすることができます。

## 説明
### 説明
- AWS Systems Managerエージェントをコンテナで実行します。
- AWS Systems Managerを使用して、コンテナにアクセスします。
- サンプルとしてDebianベースとAmazon Linuxベースのコンテナ用のDockerfileが格納されています。

## 使用方法
### 使用方法
2つの環境変数が必要となります。

| 環境変数名 | 説明 |
Expand Down
12 changes: 12 additions & 0 deletions kustomize/rollout-integration/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

# Rollout を kustomize で扱うための設定を components にまとめる
# https://argo-rollouts.readthedocs.io/en/latest/features/kustomize/

configurations:
- https://argoproj.github.io/argo-rollouts/features/kustomize/rollout-transform.yaml
- rollout-transform.yaml

openapi:
path: https://raw.githubusercontent.com/argoproj/argo-schema-generator/main/schema/argo_all_k8s_kustomize_schema.json
6 changes: 6 additions & 0 deletions kustomize/rollout-integration/rollout-transform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 元の configurations に足りないものを追加する
# これがないと Kustomization の labels が上手く動かない
templateLabels:
- path: spec/template/metadata/labels
create: true
kind: Rollout

0 comments on commit 8fe0854

Please sign in to comment.