├── .dockerignore ├── .gitignore ├── .helmignore ├── Dockerfile ├── Jenkinsfile ├── LICENSE ├── README.md ├── charts ├── preview │ ├── Chart.yaml │ ├── Makefile │ ├── requirements.yaml │ └── values.yaml └── spring-cloud-k8s-boss │ ├── .helmignore │ ├── Chart.yaml │ ├── Makefile │ ├── README.md │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ └── service.yaml │ └── values.yaml ├── pom.xml ├── skaffold.yaml └── src ├── main ├── java │ └── org │ │ └── minions │ │ └── demo │ │ ├── Application.java │ │ └── Controller.java └── resources │ ├── application.properties │ └── logback-test.xml └── test └── java └── org └── minions └── demo └── ApplicationTests.java /.dockerignore: -------------------------------------------------------------------------------- 1 | draft.toml 2 | charts/ 3 | NOTICE 4 | LICENSE 5 | README.md -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | 3 | # Compiled class file 4 | *.class 5 | 6 | # Log file 7 | *.log 8 | 9 | # BlueJ files 10 | *.ctxt 11 | 12 | # Mobile Tools for Java (J2ME) 13 | .mtj.tmp/ 14 | 15 | # Package Files # 16 | *.jar 17 | *.war 18 | *.ear 19 | *.zip 20 | *.tar.gz 21 | *.rar 22 | 23 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 24 | hs_err_pid* 25 | 26 | #IDE metadata 27 | **.idea/** 28 | .idea/ 29 | *.iml 30 | 31 | # Eclipse 32 | .project 33 | .classpath 34 | .settings -------------------------------------------------------------------------------- /.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | *.png 23 | 24 | # known compile time folders 25 | target/ 26 | node_modules/ 27 | vendor/ -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jdk-slim 2 | ENV PORT 8080 3 | ENV CLASSPATH /opt/lib 4 | EXPOSE 8080 5 | 6 | # copy pom.xml and wildcards to avoid this command failing if there's no target/lib directory 7 | COPY pom.xml target/lib* /opt/lib/ 8 | 9 | # NOTE we assume there's only 1 jar in the target dir 10 | # but at least this means we don't have to guess the name 11 | # we could do with a better way to know the name - or to always create an app.jar or something 12 | COPY target/*.jar /opt/app.jar 13 | WORKDIR /opt 14 | CMD ["java", "-jar", "app.jar"] -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent { 3 | label "jenkins-maven" 4 | } 5 | environment { 6 | ORG = 'salaboy' 7 | APP_NAME = 'spring-cloud-k8s-boss' 8 | CHARTMUSEUM_CREDS = credentials('jenkins-x-chartmuseum') 9 | } 10 | stages { 11 | stage('CI Build and push snapshot') { 12 | when { 13 | branch 'PR-*' 14 | } 15 | environment { 16 | PREVIEW_VERSION = "0.0.0-SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER" 17 | PREVIEW_NAMESPACE = "$APP_NAME-$BRANCH_NAME".toLowerCase() 18 | HELM_RELEASE = "$PREVIEW_NAMESPACE".toLowerCase() 19 | } 20 | steps { 21 | container('maven') { 22 | sh "mvn versions:set -DnewVersion=$PREVIEW_VERSION" 23 | sh "mvn install" 24 | sh 'export VERSION=$PREVIEW_VERSION && skaffold build -f skaffold.yaml' 25 | 26 | 27 | sh "jx step post build --image $DOCKER_REGISTRY/$ORG/$APP_NAME:$PREVIEW_VERSION" 28 | } 29 | 30 | dir ('./charts/preview') { 31 | container('maven') { 32 | sh "make preview" 33 | sh "jx preview --app $APP_NAME --dir ../.." 34 | } 35 | } 36 | } 37 | } 38 | stage('Build Release') { 39 | when { 40 | branch 'develop' 41 | } 42 | steps { 43 | container('maven') { 44 | // ensure we're not on a detached head 45 | sh "git checkout develop" 46 | sh "git config --global credential.helper store" 47 | 48 | sh "jx step git credentials" 49 | // so we can retrieve the version in later steps 50 | sh "echo \$(jx-release-version) > VERSION" 51 | sh "mvn versions:set -DnewVersion=\$(cat VERSION)" 52 | } 53 | dir ('./charts/spring-cloud-k8s-boss') { 54 | container('maven') { 55 | sh "make tag" 56 | } 57 | } 58 | container('maven') { 59 | sh 'mvn clean deploy' 60 | 61 | sh 'export VERSION=`cat VERSION` && skaffold build -f skaffold.yaml' 62 | 63 | 64 | sh "jx step post build --image $DOCKER_REGISTRY/$ORG/$APP_NAME:\$(cat VERSION)" 65 | } 66 | } 67 | } 68 | stage('Promote to Environments') { 69 | when { 70 | branch 'develop' 71 | } 72 | steps { 73 | dir ('./charts/spring-cloud-k8s-boss') { 74 | container('maven') { 75 | sh 'jx step changelog --version v\$(cat ../../VERSION)' 76 | 77 | // release the helm chart 78 | sh 'jx step helm release' 79 | 80 | // promote through all 'Auto' promotion Environments 81 | sh 'jx promote -b --all-auto --timeout 1h --version \$(cat ../../VERSION)' 82 | } 83 | } 84 | } 85 | } 86 | } 87 | post { 88 | always { 89 | cleanWs() 90 | } 91 | failure { 92 | input """Pipeline failed. 93 | We will keep the build pod around to help you diagnose any failures. 94 | 95 | Select Proceed or Abort to terminate the build pod""" 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # spring-cloud-k8s-boss -------------------------------------------------------------------------------- /charts/preview/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | description: A Helm chart for Kubernetes 3 | icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/master/images/java.png 4 | name: preview 5 | version: 0.1.0-SNAPSHOT 6 | -------------------------------------------------------------------------------- /charts/preview/Makefile: -------------------------------------------------------------------------------- 1 | OS := $(shell uname) 2 | 3 | preview: 4 | ifeq ($(OS),Darwin) 5 | sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml 6 | sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml 7 | sed -i "" -e "s/tag: .*/tag: $(PREVIEW_VERSION)/" values.yaml 8 | else ifeq ($(OS),Linux) 9 | sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml 10 | sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml 11 | sed -i -e "s|repository: .*|repository: $(DOCKER_REGISTRY)\/salaboy\/spring-cloud-k8s-boss|" values.yaml 12 | sed -i -e "s/tag: .*/tag: $(PREVIEW_VERSION)/" values.yaml 13 | else 14 | echo "platfrom $(OS) not supported to release from" 15 | exit -1 16 | endif 17 | echo " version: $(PREVIEW_VERSION)" >> requirements.yaml 18 | jx step helm build 19 | -------------------------------------------------------------------------------- /charts/preview/requirements.yaml: -------------------------------------------------------------------------------- 1 | 2 | dependencies: 3 | - alias: expose 4 | name: exposecontroller 5 | repository: https://chartmuseum.build.cd.jenkins-x.io 6 | version: 2.3.56 7 | - alias: cleanup 8 | name: exposecontroller 9 | repository: https://chartmuseum.build.cd.jenkins-x.io 10 | version: 2.3.56 11 | - alias: preview 12 | name: spring-cloud-k8s-boss 13 | repository: file://../spring-cloud-k8s-boss 14 | -------------------------------------------------------------------------------- /charts/preview/values.yaml: -------------------------------------------------------------------------------- 1 | 2 | expose: 3 | Annotations: 4 | helm.sh/hook: post-install,post-upgrade 5 | helm.sh/hook-delete-policy: hook-succeeded 6 | config: 7 | exposer: Ingress 8 | http: true 9 | tlsacme: false 10 | 11 | cleanup: 12 | Args: 13 | - --cleanup 14 | Annotations: 15 | helm.sh/hook: pre-delete 16 | helm.sh/hook-delete-policy: hook-succeeded 17 | 18 | preview: 19 | image: 20 | repository: 21 | tag: 22 | pullPolicy: IfNotPresent -------------------------------------------------------------------------------- /charts/spring-cloud-k8s-boss/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | -------------------------------------------------------------------------------- /charts/spring-cloud-k8s-boss/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | description: A Helm chart for Kubernetes 3 | icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/master/images/java.png 4 | name: spring-cloud-k8s-boss 5 | version: 0.1.0-SNAPSHOT 6 | -------------------------------------------------------------------------------- /charts/spring-cloud-k8s-boss/Makefile: -------------------------------------------------------------------------------- 1 | CHART_REPO := http://jenkins-x-chartmuseum:8080 2 | CURRENT=$(pwd) 3 | NAME := spring-cloud-k8s-boss 4 | OS := $(shell uname) 5 | RELEASE_VERSION := $(shell cat ../../VERSION) 6 | 7 | build: clean 8 | rm -rf requirements.lock 9 | helm dependency build 10 | helm lint 11 | 12 | install: clean build 13 | helm install . --name ${NAME} 14 | 15 | upgrade: clean build 16 | helm upgrade ${NAME} . 17 | 18 | delete: 19 | helm delete --purge ${NAME} 20 | 21 | clean: 22 | rm -rf charts 23 | rm -rf ${NAME}*.tgz 24 | 25 | release: clean 26 | helm dependency build 27 | helm lint 28 | helm init --client-only 29 | helm package . 30 | curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-$(shell sed -n 's/^version: //p' Chart.yaml).tgz" $(CHART_REPO)/api/charts 31 | rm -rf ${NAME}*.tgz% 32 | 33 | tag: 34 | ifeq ($(OS),Darwin) 35 | sed -i "" -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml 36 | sed -i "" -e "s/tag: .*/tag: $(RELEASE_VERSION)/" values.yaml 37 | else ifeq ($(OS),Linux) 38 | sed -i -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml 39 | sed -i -e "s|repository: .*|repository: $(DOCKER_REGISTRY)\/salaboy\/spring-cloud-k8s-boss|" values.yaml 40 | sed -i -e "s/tag: .*/tag: $(RELEASE_VERSION)/" values.yaml 41 | else 42 | echo "platfrom $(OS) not supported to release from" 43 | exit -1 44 | endif 45 | git add --all 46 | git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed 47 | git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)" 48 | git push origin v$(RELEASE_VERSION) 49 | -------------------------------------------------------------------------------- /charts/spring-cloud-k8s-boss/README.md: -------------------------------------------------------------------------------- 1 | # Java application -------------------------------------------------------------------------------- /charts/spring-cloud-k8s-boss/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 2 | Get the application URL by running these commands: 3 | 4 | kubectl get ingress {{ template "fullname" . }} 5 | -------------------------------------------------------------------------------- /charts/spring-cloud-k8s-boss/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | */}} 13 | {{- define "fullname" -}} 14 | {{- $name := default .Chart.Name .Values.nameOverride -}} 15 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 16 | {{- end -}} 17 | -------------------------------------------------------------------------------- /charts/spring-cloud-k8s-boss/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: {{ template "fullname" . }} 5 | labels: 6 | draft: {{ default "draft-app" .Values.draft }} 7 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 8 | spec: 9 | replicas: {{ .Values.replicaCount }} 10 | template: 11 | metadata: 12 | labels: 13 | draft: {{ default "draft-app" .Values.draft }} 14 | app: {{ template "fullname" . }} 15 | {{- if .Values.podAnnotations }} 16 | annotations: 17 | {{ toYaml .Values.podAnnotations | indent 8 }} 18 | {{- end }} 19 | spec: 20 | containers: 21 | - name: {{ .Chart.Name }} 22 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 23 | imagePullPolicy: {{ .Values.image.pullPolicy }} 24 | ports: 25 | - containerPort: {{ .Values.service.internalPort }} 26 | livenessProbe: 27 | httpGet: 28 | path: {{ .Values.probePath }} 29 | port: {{ .Values.service.internalPort }} 30 | initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} 31 | periodSeconds: {{ .Values.livenessProbe.periodSeconds }} 32 | successThreshold: {{ .Values.livenessProbe.successThreshold }} 33 | timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} 34 | readinessProbe: 35 | httpGet: 36 | path: {{ .Values.probePath }} 37 | port: {{ .Values.service.internalPort }} 38 | periodSeconds: {{ .Values.readinessProbe.periodSeconds }} 39 | successThreshold: {{ .Values.readinessProbe.successThreshold }} 40 | timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} 41 | resources: 42 | {{ toYaml .Values.resources | indent 12 }} 43 | terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} 44 | -------------------------------------------------------------------------------- /charts/spring-cloud-k8s-boss/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | {{- if .Values.service.name }} 5 | name: {{ .Values.service.name }} 6 | {{- else }} 7 | name: {{ template "fullname" . }} 8 | {{- end }} 9 | labels: 10 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 11 | type: boss 12 | {{- if .Values.service.annotations }} 13 | annotations: 14 | {{ toYaml .Values.service.annotations | indent 4 }} 15 | {{- end }} 16 | spec: 17 | type: {{ .Values.service.type }} 18 | ports: 19 | - port: {{ .Values.service.externalPort }} 20 | targetPort: {{ .Values.service.internalPort }} 21 | protocol: TCP 22 | name: http 23 | selector: 24 | app: {{ template "fullname" . }} 25 | -------------------------------------------------------------------------------- /charts/spring-cloud-k8s-boss/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for Maven projects. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | replicaCount: 1 5 | image: 6 | repository: draft 7 | tag: dev 8 | pullPolicy: IfNotPresent 9 | service: 10 | name: spring-cloud-k8s-boss 11 | type: ClusterIP 12 | externalPort: 80 13 | internalPort: 8080 14 | annotations: 15 | fabric8.io/expose: "true" 16 | fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx" 17 | resources: 18 | limits: 19 | cpu: 500m 20 | memory: 512Mi 21 | requests: 22 | cpu: 400m 23 | memory: 512Mi 24 | probePath: /actuator/health 25 | livenessProbe: 26 | initialDelaySeconds: 60 27 | periodSeconds: 10 28 | successThreshold: 1 29 | timeoutSeconds: 1 30 | readinessProbe: 31 | periodSeconds: 10 32 | successThreshold: 1 33 | timeoutSeconds: 1 34 | terminationGracePeriodSeconds: 10 -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | 8 | org.spring.cloud.k8s.examples 9 | boss 10 | 1.0-SNAPSHOT 11 | 12 | jar 13 | 14 | boss 15 | Boss Project 16 | 17 | 18 | 1.8 19 | 2.0.4.RELEASE 20 | Finchley.SR1 21 | 0.3.0.RELEASE 22 | 3.7.0 23 | 24 | 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-dependencies 30 | ${spring-boot.version} 31 | pom 32 | import 33 | 34 | 35 | org.springframework.cloud 36 | spring-cloud-dependencies 37 | ${spring-cloud.version} 38 | pom 39 | import 40 | 41 | 42 | org.springframework.cloud 43 | spring-cloud-kubernetes-dependencies 44 | ${spring.cloud.k8s.version} 45 | pom 46 | import 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | org.springframework.boot 55 | spring-boot-starter-web 56 | 57 | 58 | org.springframework.boot 59 | spring-boot-actuator 60 | 61 | 62 | org.springframework.boot 63 | spring-boot-actuator-autoconfigure 64 | 65 | 66 | org.springframework.boot 67 | spring-boot-starter-test 68 | test 69 | 70 | 71 | 72 | 73 | 74 | 75 | org.apache.maven.plugins 76 | maven-compiler-plugin 77 | ${maven-compiler-plugin.version} 78 | 79 | ${java.version} 80 | ${java.version} 81 | true 82 | true 83 | true 84 | 85 | 86 | 87 | org.springframework.boot 88 | spring-boot-maven-plugin 89 | 90 | 91 | 92 | repackage 93 | 94 | 95 | 96 | 97 | 98 | org.apache.maven.plugins 99 | maven-deploy-plugin 100 | 2.8.2 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | spring-milestones 109 | Spring Milestones 110 | https://repo.spring.io/milestone/ 111 | 112 | true 113 | 114 | 115 | 116 | spring-snapshots 117 | Spring Snapshots 118 | https://repo.spring.io/snapshot/ 119 | 120 | false 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /skaffold.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: skaffold/v1alpha2 2 | kind: Config 3 | build: 4 | tagPolicy: 5 | envTemplate: 6 | template: "{{.DOCKER_REGISTRY}}/salaboy/spring-cloud-k8s-boss:{{.VERSION}}" 7 | artifacts: 8 | - imageName: changeme 9 | workspace: . 10 | docker: {} 11 | local: {} 12 | deploy: 13 | kubectl: 14 | manifests: 15 | profiles: 16 | - name: dev 17 | build: 18 | tagPolicy: 19 | envTemplate: 20 | template: "{{.DOCKER_REGISTRY}}/salaboy/spring-cloud-k8s-boss:{{.DIGEST_HEX}}" 21 | artifacts: 22 | - docker: {} 23 | local: {} 24 | deploy: 25 | helm: 26 | releases: 27 | - name: spring-cloud-k8s-boss 28 | chartPath: charts/spring-cloud-k8s-boss 29 | setValueTemplates: 30 | image.repository: "{{.DOCKER_REGISTRY}}/salaboy/spring-cloud-k8s-boss" 31 | image.tag: "{{.TAG}}" 32 | -------------------------------------------------------------------------------- /src/main/java/org/minions/demo/Application.java: -------------------------------------------------------------------------------- 1 | package org.minions.demo; 2 | 3 | import org.apache.commons.logging.Log; 4 | import org.apache.commons.logging.LogFactory; 5 | import org.springframework.boot.CommandLineRunner; 6 | import org.springframework.boot.SpringApplication; 7 | import org.springframework.boot.autoconfigure.SpringBootApplication; 8 | 9 | @SpringBootApplication 10 | public class Application implements CommandLineRunner { 11 | 12 | private static final Log log = LogFactory.getLog(Application.class); 13 | 14 | public static void main(String[] args) { 15 | SpringApplication.run(Application.class, 16 | args); 17 | } 18 | 19 | @Override 20 | public void run(String... args) throws Exception { 21 | log.info(">>> Boss Started! "); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/org/minions/demo/Controller.java: -------------------------------------------------------------------------------- 1 | package org.minions.demo; 2 | 3 | import java.net.InetAddress; 4 | import java.net.UnknownHostException; 5 | import java.util.Random; 6 | 7 | import org.apache.commons.logging.Log; 8 | import org.apache.commons.logging.LogFactory; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import org.springframework.beans.factory.annotation.Value; 12 | import org.springframework.web.bind.annotation.PathVariable; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.ResponseBody; 15 | import org.springframework.web.bind.annotation.RestController; 16 | 17 | import static org.springframework.web.bind.annotation.RequestMethod.GET; 18 | import static org.springframework.web.bind.annotation.RequestMethod.POST; 19 | 20 | @RestController 21 | public class Controller { 22 | 23 | private static final Log log = LogFactory.getLog(Controller.class); 24 | private final String version = "0.1"; 25 | 26 | private static final Logger LOG = LoggerFactory.getLogger(Controller.class); 27 | 28 | private final String hostName = System.getenv("HOSTNAME"); 29 | 30 | private String[] missionTypes = {"do the laundry", "mine some cryto currencies", "buy groceries", "read a book", "do some coding"}; 31 | 32 | @Value("boss") 33 | private String appName; 34 | 35 | public Controller() { 36 | 37 | } 38 | 39 | @RequestMapping(method = POST, path = "/mission/{minion}") 40 | public String mission(@PathVariable("minion") String minion) { 41 | log.info("Minion: " + minion + " is ready to work!"); 42 | int randomTask = new Random().nextInt(missionTypes.length); 43 | return missionTypes[randomTask]; 44 | } 45 | 46 | @RequestMapping(method = GET, path = "/") 47 | @ResponseBody 48 | public String boss() throws UnknownHostException { 49 | 50 | StringBuilder stringBuilder = new StringBuilder(); 51 | stringBuilder.append("Host: ").append(InetAddress.getLocalHost().getHostName()).append("
"); 52 | stringBuilder.append("Minion Type: ").append(appName).append("
"); 53 | stringBuilder.append("IP: ").append(InetAddress.getLocalHost().getHostAddress()).append("
"); 54 | stringBuilder.append("Version: ").append(version).append("
"); 55 | stringBuilder.append(" \n" + 56 | " \n" + 57 | " ........ \n" + 58 | " .....,,,. \n" + 59 | " .,,,,,,/. ,. ,/(##%(....(######*. \n" + 60 | " ,,*//////. *** .*,,,,,,,,,.,,,,*****,**,. \n" + 61 | " .,*/*//****,***/ ,,,...,,,,....,,,,,,,..,,,,,, \n" + 62 | " .,*****,,,,**** ..,,, *#&*,,......,,,..#%#..,,,,,,.,,. \n" + 63 | " .,****,,,,**/, .,,,,...**,,........,,,,,*,,,,,,,,,,,*, \n" + 64 | " ,****,,*//. ,,.,,,,,,,..,.....,,*,,,,****,...,,,,,, \n" + 65 | " ,******/, ,,..........,,,******,,,.......,,,,,,,,(. \n" + 66 | " .****/* ,,.........,,,,,***,,,,,,,,,,,,,,,,,,,(%&( \n" + 67 | " .,,,***, ,,,,,.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,**(&/## \n" + 68 | " /%######%&* .*/,,,,,,,,,,,,,,,,,,,,,,,,,,,**,,,,,****(&(//#/. \n" + 69 | " (%%%%&&%%&/ ,((/#/,,,,,,,,,,,,,,,,,,,,,,****,,,********#@(//(###(, \n" + 70 | " (%%%%&&%%&( .(##(//(%**,,,,,,*,,,,,*******/**,***********/@&///##((((#/. \n" + 71 | " (%%%%&&%&@# *##((((///%#*****,,,,,,***********************#&%///(#####(((##(, \n" + 72 | " (%%%%&&&&@% .(##((((###(/(#******,********************////(&&&%#/((######(((((##%#*. \n" + 73 | " (%%%%&&&%&&. .*#%###%&&&&&&%#(#&&%&&/************************///#&%&&%%&&(##%&&&&&&&&&%((((##%(* \n" + 74 | " /%%%%&&&%%&* .,***(#################((%&&(/#//***************////(#%#((#&&&&&&###############((((((#%***,. \n" + 75 | " /%%%%&&&&% ./#########################(%&&&((//(#%%#((/////////((####((((((#&&&&&&&%####################(#%((###%#* \n" + 76 | " *%%%%&&&&%&%. *%#(((###############%#######&&&&&%(((((((((((%&&&&@@#(#####((((##%&&&&%%%%#######%%############%%########%%. \n" + 77 | " ,%%%%&&&&%&&* .(%#((#######%%%#%#######%%####%&%%&&%(######((((%@@@@@@#((#######(((&(////(####%%%##############%########%%%&&* \n" + 78 | " .%%%%%&&&&%&%* .(%##(#####%%%%%%%%%%%%%%%%%%%%%%%#((###%#((((((((###@@@@@@%####((((###(///////((##%&%##########%%%%%%%#######%%%%%%&/ \n" + 79 | " #%%%%&&&&%&*#%##(#####%%%&&&%&&%%%%%%%%%%%%%%%%#/////////%@&%%#((((&&&&&((##%%&&&&(///(////(#&%%######%%%%%%%%%%%%&%%%%%%%%%%%%%%&, \n" + 80 | " (%%%%%&&&%&&&%((#####%%&&&&&&&&&&&%%%%%%%%%%%%%%%(/(/(/(///%%#%%%&&&@@%%%%&@&&%%%%##%%///(((//((#%%%#%#%%%%%%%%%%%%%%%&%%&&&%%#%%%%%%&% \n" + 81 | " *%%%%%%&&&%&&&@@%%%&&&&&&&&&&&&&&&&&%%%%%%%%%%%%%(/(///(//(%%######%&%*. *%%%#######%%/(((((//((#%%%%%%%%%%%%%%%%%%%%%&&&&&&%%%%%%%%%%%, \n" + 82 | " .%%%%%%%&&%&&&&@@&&&&&&&&&&&@@&&&&&&&%%%%%%%%%%%%(////((//(%%######%%%/,.,#%%######%%#//((((//((#%%%%%%%%%%%%%%%%%%%%%&&&&&&&&%%%%%%%%%( \n" + 83 | " #%%%%%%&&%&&&@@@@&&&&&&&&@@@@&&&&&&&&%%%%%%%%%%#((///((//(&%######%%#((%/#%%######%&%#%%%#######%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&%%%%%%%. \n" + 84 | " (%%%%%%%&%&&&&&@&&&&&&@@@@@@@@&&&&&&&%%%%%%%%%%#((///////(@&%&%%##% .%%%%%&&&&&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&%%%%%%&* \n" + 85 | " /&&%%%%%&%%&&&&&&&&&&&&&&&&@@&&&&&&&&&%%%%%%%%%##((((((//#@%%%%%%&%%#*,*(%%%&&%%%%%%&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%&&@&&&&&&&&&&%%%%%%( \n" + 86 | " .*(#&%%%&&&&&&%%#(//////((##%%%%%%%%%%%%%%%%%%&&&&&&&&&&@&%%%####%%#,../%%%%%%%%%%%%######%##%%%%%%%%%%%%%%%%%%%%%%&&&@@&&&&&&&&%%%%%%%. \n" + 87 | " *((*,,,, /%&%%%%%%%%%%%%&&&%%&%%%&@&%######%%#,.,/%%%%%%%%%%%(((((((((((#%%%%%%%%%%%%%%%%%%%&&@*#@@&&&&&&%&%%%%%%* \n" + 88 | " .%%%%%%%%%%%%%%&%%%%%%%%&@%######%%%#,.,(%%%%%%%%%%&(((((((((((#%%%%%%%%%%%%%%%%%%%&&%. %@@&&&&&&&&%%%%%( \n" + 89 | " #%%%%%%%%%%%%%(/(//////(%%######%%%%,,,/%%%%%%%%%%&(((((((((((#%%%%%%%%%%%%%%%%%%&&&( .&@@&&&&&&&%%%%%%. \n" + 90 | " *%%%%%%%%%%%%%((((((///(%#######%%%%,,*#&%%%%%%%%%&(((((((((((#%%%%%%%%%%%%%%%%%%&&&, *@@@&&&&&&&%%%%&* \n" + 91 | " .%%%%%%%%%%%%%((((((///(######%%%%,,*%&%%%%%%%%&&(((((((((((#%%%%%%%%%%%%%%%%%%& #@@&&&&&&&%%%%%( \n" + 92 | " (%%%%%%%%%%%%(((((////(#######&&(,,*#&&%%%%%%%&&(((((((((((#%%%%%%%%%%%%%%%%%&&&( %@@&&&&&&&%%%%%. \n" + 93 | " *%%%%%%%%%%%%((((((///(######%&%(,,*#&&%%%%%%%&###(((((((%%%%%%%%%%%%%%%%%%&&&, .&@@&&&&&&%%%%&, \n" + 94 | " .%%%%%%%%%%%%(((((((//(######%%%%,,*%&%&&%%&&&&&@@@&&&&&&&&%%%%%%%%%%%%%%%%%%&&%. *@@&&&&&&&%%%%&* \n" + 95 | " .#%%%%%%%%%%%(/(((((///&%######%%%%,,*%&%&&%&&&&&&@@@&&&&&&&&%%%%%%%%%%%%%%%%%&& #@@&&&&&&%%%%%( \n" + 96 | " (%%%%%%%%%%%%&&&%%%%%%@%#####%%&%/,,/%&&%&&&&&&&&@@@@&&&&&&&%%%%%%%%%%%%%%%%%&&&( #@@&&&&&&&%%%%. \n" + 97 | " *%%%%%%%%%%%%&&&&&&&%&@%#####%%&&(,*/#&@%%&&&&&&%(((((((((((%%%%%%%%%%%%%%%%%&&%* .@@@@@&&&&%%%%, \n" + 98 | " .%%%%%%%%%%%%&&&&&&&%&@%####%%%%&%**/%&%&&&&&&&&%(((((((((((%&%%%%%%%%%%%%%%&&&%. *@@&&@&&@%%%%( \n" + 99 | " .#%%%%%%%%%%#/((((((((%%%###%%%%&%,*/%&%%&&&&&&&%(((((((((((%%%&%%%%%%%%%%%%&&%# .&@@&&%%%%%%%% \n" + 100 | " (%%%%%%%%%%#(((((((((%&%#%%%%%%%#**/%&%&&&&&&&&%(((((((((((%%%%&%%%%%%%%%%%&&%( /@@&&&%%%%%%%, \n" + 101 | " /%%%%%%%%%%#(((((((((%&%%%%%%%%%%**/#&%&&&&&&&&%(((((((((((%%%%%%&%%%%%%%%&&&%* %@@&&%%%%%%%( \n" + 102 | " ,%%%%%%%%%%#(((((((((#&%%%%%%%%%%**/#&%&&&&&&&&%(((((((((((#%%%%%%%%%%%%%&&&%%. ,#@&&%%%%%%%%. \n" + 103 | " .%%%%%%%%%%#(((((((((#&%%%%%%%%%%**/#&&&&&&&&&&%(((((((((((#%%%%%%%%%%%%%&&&%#. .&&&&%%%%%%%* \n" + 104 | " #%%%%%%%%%#(((((((((#&%%%%%%%%%%**/#&&&&&&&&&&@@@@@&&&&&&&&%%%%%%%%%%%%&&&&%( (@&&%%%%%%%( \n" + 105 | " (%%%%%%%%%#((((((((((&%%%%%%%%%%**/#&&&&&&&&&&@@@@&&&&&&&&&%%%%%%%%%%%%&&&&%/ ,&&&&%%#%%%# \n" + 106 | " /%%%%%%%%%%%%####(((#&%%%%%%%%%%**/#&&&&&&&&&&&@@@&&&&&&&&&%%%%%%%%%%%%&&&%%* (&&&%%#%%%%, \n" + 107 | " *%%%%%%%%%%&&&&&&&&&@@&%%%%%%%%%**/#&&&&&&&&&&&&&&&&&&&&&%%%%%%%%%%%%%&&&&%%. .&&&%%##%%%/ \n" + 108 | " ,%%%%%%%%%%&&&&&&&&&&@&%%%%%%%%%**/#&&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%&&&&%#. (&&&%###%%# \n" + 109 | " .%%%%%%%%%#(((((####%&&%%%%%%%%%/*/(&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%&%&&%# .&&&%%###%%, \n" + 110 | " #%%%%%%%%#((((((((((%&%%%%%%%%%/*/#&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%%%&&%/ (&&%%###%%/ \n" + 111 | " (%%%%%%%%#((((((((((#&%%%%%%%%%///#&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%%&%%* .%&%%%##% \n" + 112 | " /%%%%%%%%#((((((((((#@%%%%%%%%%/*/#&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%%%%%, (&%*,,./%, \n" + 113 | " *%%%%%%%%#((((((((((#@&%%%%%%%%/*/#&&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%%%%. ,*,.,, \n" + 114 | " .*(#%%%%#((((((((((#&&%%%%%%&&/*/(&&&&&&&&&&&&&&&&&&%%%%%%%%&&&&&&&%%(*, .,..,,, \n" + 115 | " .,((((((((((#&&%%%%%%%%(/(#&&&&&&&&&&&&&&&%%%%%&&&&/*,.. ,,..,,,,. \n" + 116 | " *%%####((((#&@@@@@@@@@@&. /@@&&&@@@@@@@@@&&@/ .,,,,,.,,, \n" + 117 | " /&&&&&&&&&@@&@@@@@@@@@@% ,@@&&&@@@@@@@@&&&&* ,.,***,..,, \n" + 118 | " (&&&&&&&%&&@&@@@@@@@@@@# .&@&&&&@@@@@@&&&&&, ,,,. ,,,,* \n" + 119 | " ,/(((##&&&&&&@@@@@@@@@&/ #@&&&&@@@@@&&&&&&. .,,. .,,** \n" + 120 | " (&&&&&@@@@@@@@@#, /@@&&&@@@@@&&&&&%. .,*** \n" + 121 | " /&&&&&@@@@@&@@@/. ,@@&&&&&@@&&&&&&% ..,,****. \n" + 122 | " ,&&&&&&@@@@&@@@, %@&&&&&&&&&&&& ./////*, \n" + 123 | " %&&&&&&&@&&@@&. (@&&&&&&&&&&&&&( \n" + 124 | " (&&&&&&@@&&@@% ,@@&&&&&&&&&&&&* \n" + 125 | " *&&&&&&@@&&@@( .&@&&&&&&&&&&&&, \n" + 126 | " .&&&&&@@@&&@@* #@&&&&&&&&&&&&. \n" + 127 | " %&&&&@@@&&@&, *@&&&&&&&&&&&% \n" + 128 | " (&&&&&@@&&@&. .&@&&&&&&&&& \n" + 129 | " /&&&&&@@@@@% #@&&@@@&&&&&( \n" + 130 | " *&&&&&&&&@@# /@&&&&&&@&&&( \n" + 131 | " /&&&&&@&&@@# ,@&&&&&&&&@@% \n" + 132 | " .&&&&&@@&@@( .&@&&&&&&&&@/ \n" + 133 | " .&&&&&@&&@@( (@&&&&&&&&&( \n" + 134 | " .%&&&&@@&@@( /@&&&&@&&&&( \n" + 135 | " %&&&&@&&@@( /@&&&@@&&&&( \n" + 136 | " #&&&&@&&@@( /@&&&&&&&&&( \n" + 137 | " #&&&&&&&@@( *@&&&&&&&&@( \n" + 138 | " (&&&&&&&@@( ,@&&&&&&&&@( \n" + 139 | " *&&&&&&&@@( .&&&&&&&&&@/ \n" + 140 | " ,&&&&&&&@@( .&@&&&&&&&&/ \n" + 141 | " .&&&&&&&@@( %@&&&&&&&&* \n" + 142 | " %&&&&&&@@( #@&&&&&&&&* \n" + 143 | " #&&&&@&@@/ (@&&&&&&&&, \n" + 144 | " (&&&&@&@@/ /@&&&&&&&&, \n" + 145 | " /&&&&@&@@/ *@&&&@&&&&. \n" + 146 | " ,&&&&@&@@( ,@&&&@&&&&. \n" + 147 | " .&&&&@&@@( ,&&&@@&&@%. \n" + 148 | " %&&&@@@@/ .&@&@@&&@% \n" + 149 | " #&&&@@@@/ .&@&@@&&@% \n" + 150 | " *&&&@@@@, %@@@@&&@# \n" + 151 | " /&&&&&&. (@&&@@@( \n" + 152 | " *&&&&@&. /@&&@&@( \n" + 153 | " (&&&&@&. *@&&&&&% \n" + 154 | " .&&&@&&((((((##(((((((((((#&&&&&&&//*, \n" + 155 | " .,*/(#&&@&&&&%((((######(((((((((#&&&&&&((((* \n" + 156 | " .*/(((((((#%&&@&&&&%(((((((((((((((((((%&&@&&&&%#(((((((/,. . \n" + 157 | " .....,///////(##((%&&&&@&&&%#((((((((((((((((((%&&&&&&&%((##(/(///(/,...... \n" + 158 | " ......,////////((//(#&&&&@&&&%#((((((((((((((((((#&&&&&&&(((((////////*,....... \n" + 159 | " ......,////*////////(#&&&@&(((((((((((((((////(((&&&&&&&%(((/////////////,....... \n" + 160 | " .....,/**//////*/////((##%%&@@@@&&%#((//#&&&&&&&%#/(%&&&%((////////////////*....... \n" + 161 | " ...,/*********//////(&%@@#(//*/&&&&&@@&%###%&&&%&%///(/////////////////((*..... \n" + 162 | " ./(/**********///(%&&@@@@&%(/////(#%&&&&%%&%(//////***//////////(#/... \n" + 163 | " .*(((//****//******//((##%%%%%##((//****//////////***///(#(/,. \n" + 164 | " ..,*(/************///////////*///////////(##((/*,.. \n" + 165 | " ,(/**********////////////////////(#(,. \n" + 166 | " .*((((////*/////////////(((#(/,. \n" + 167 | " ...,,,,***,,... \n" + 168 | " \n" + 169 | " \n" + 170 | ""); 171 | return stringBuilder.toString(); 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.application.name=spring-cloud-k8s-boss 2 | server.port=8080 -------------------------------------------------------------------------------- /src/main/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/test/java/org/minions/demo/ApplicationTests.java: -------------------------------------------------------------------------------- 1 | package org.minions.demo; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class ApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | --------------------------------------------------------------------------------