Skip to content

Instantly share code, notes, and snippets.

@fauzan-n
fauzan-n / pom.xml
Created July 28, 2019 10:49
Add this dependency
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-kubernetes-config</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
spring:
application:
name: app-name-example
cloud:
kubernetes:
reload:
enabled: true
config:
name: app-name-example
namespace: default
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rbac-default-namespace
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: ClusterRole
apiVersion: v1
kind: ConfigMap
metadata:
name: app-name-example
namespace: default
data:
application.yml: |-
app:
name: app-name-example
spring:
apiVersion: v1
kind: ConfigMap
metadata:
name: app-name-example
namespace: default
data:
application.yml: |-
app:
name: app-name-example
spring:
apiVersion: v1
kind: ConfigMap
metadata:
name: app-name-example
namespace: default
data:
application.yml: |-
app:
name: app-name-example
spring:
apiVersion: v1
data:
environment: develop
db_host: "develop-mysql.default.svc.cluster.local:3306"
db_user: devdbuser
kind: ConfigMap
metadata:
name: globalenv
namespace: default
apiVersion: v1
data:
DB_PASSWD: ZGV2ZGJwYXNzd2Q=
kind: Secret
metadata:
name: globalsec
namespace: default
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: app-name-example
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: app-name-example
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->