-
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.
- Loading branch information
cristov
committed
Aug 13, 2018
1 parent
17e68ba
commit 156ecef
Showing
4 changed files
with
147 additions
and
41 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
114 changes: 114 additions & 0 deletions
114
Phase3/401-configmaps-and-secrets/images/parameter-store-kubernetes/bin/pom.xml
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,114 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.examples.java</groupId> | ||
<artifactId>parameter-store-kubernetes</artifactId> | ||
<packaging>jar</packaging> | ||
<version>1.0-SNAPSHOT</version> | ||
<url>http://maven.apache.org</url> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-ssm</artifactId> | ||
<version>1.11.235</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.6.1</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>1.5.0</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<mainClass>org.examples.java.App</mainClass> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>3.0.2</version> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<mainClass>org.examples.java.App</mainClass> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>docker</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>docker-maven-plugin</artifactId> | ||
<version>0.22.1</version> | ||
<configuration> | ||
<images> | ||
<image> | ||
<name>arungupta/${project.name}</name> | ||
<build> | ||
<from>openjdk:latest</from> | ||
<assembly> | ||
<descriptorRef>artifact</descriptorRef> | ||
</assembly> | ||
<cmd>java -jar maven/${project.name}-${project.version}.jar</cmd> | ||
</build> | ||
</image> | ||
</images> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>docker:build</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>build</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>docker:push</id> | ||
<phase>install</phase> | ||
<goals> | ||
<goal>push</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> | ||
|
13 changes: 13 additions & 0 deletions
13
...e3/401-configmaps-and-secrets/images/parameter-store-kubernetes/bin/readme.adoc
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,13 @@ | ||
= AWS Parameter Store and Kubernetes | ||
|
||
This application shows how a Java application deployed as a Pod in a Kubernetes cluster can read secrets from AWS Parameter Store. | ||
|
||
. Build Docker image: `mvn package -Pdocker` | ||
. Push Docker image: `docker push arungupta/parameter-store-kubernetes:latest` | ||
|
||
== To be tested | ||
|
||
. Delete pod: `kubectl delete pod/parameter-store-kubernetes` | ||
. Deploy pod: `kubectl apply -f pod.yaml` | ||
. Check pod logs: `kubectl logs pod/parameter-store-kubernetes` | ||
|
Binary file added
BIN
+2.32 KB
...d-secrets/images/parameter-store-kubernetes/bin/src/main/java/org/examples/java/App.class
Binary file not shown.