diff options
Diffstat (limited to 'kubernetes/aai/charts/aai-resources')
7 files changed, 1002 insertions, 0 deletions
diff --git a/kubernetes/aai/charts/aai-resources/.helmignore b/kubernetes/aai/charts/aai-resources/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/aai/charts/aai-resources/Chart.yaml b/kubernetes/aai/charts/aai-resources/Chart.yaml new file mode 100644 index 0000000000..3ab5c1a486 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: ONAP AAI resources +name: aai-resources +version: 2.0.0 diff --git a/kubernetes/aai/charts/aai-resources/resources/config/log/logback.xml b/kubernetes/aai/charts/aai-resources/resources/config/log/logback.xml new file mode 100644 index 0000000000..6cfc293f46 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/resources/config/log/logback.xml @@ -0,0 +1,345 @@ +<configuration debug="false" scan="true" scanPeriod="3 seconds"> + <contextName>${module.ajsc.namespace.name}</contextName> + <jmxConfigurator /> + <property name="logDir" value="/var/log/onap" /> + <property name="componentName" value="aai"></property> + <property name="subcomponentName" value="aai-resources"></property> + <property name="restLogDirectory" value="${logDir}/${componentName}/${subcomponentName}/rest" /> + <property name="dmaapLogDirectory" value="${logDir}/${componentName}/${subcomponentName}/dmaapAAIEventConsumer" /> + <property name="perfLogsDirectory" value="${logDir}/${componentName}/${subcomponentName}/perf-audit" /> + <!-- default eelf log file names --> + <property name="errorLogName" value="error" /> + <property name="metricsLogName" value="metrics" /> + <property name="auditLogName" value="audit" /> + <property name="debugLogName" value="debug" /> + <property name="queueSize" value="256" /> + <property name="maxFileSize" value="50MB" /> + <property name="maxHistory" value="30" /> + <property name="totalSizeCap" value="10GB" /> + <property name="pattern" value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}\t[%thread]\t%-5level\t%logger\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n" /> + <appender class="ch.qos.logback.core.ConsoleAppender" name="STDOUT"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>ERROR</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="SANE"> + <file>${restLogDirectory}/sane.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${restLogDirectory}/sane.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="asyncSANE"> + <queueSize>${queueSize}</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="SANE" /> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="METRIC"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${restLogDirectory}/${metricsLogName}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${restLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="asyncMETRIC"> + <queueSize>${queueSize}</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC" /> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="DEBUG"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${restLogDirectory}/${debugLogName}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${restLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="asyncDEBUG"> + <queueSize>${queueSize}</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="DEBUG" /> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ERROR"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${restLogDirectory}/${errorLogName}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${restLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="asyncERROR"> + <queueSize>${queueSize}</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="ERROR" /> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="AUDIT"> + <file>${restLogDirectory}/${auditLogName}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${restLogDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="asyncAUDIT"> + <queueSize>${queueSize}</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="translog"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${restLogDirectory}/translog.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${restLogDirectory}/translog.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="asynctranslog"> + <queueSize>${queueSize}</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="translog" /> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="dmaapAAIEventConsumer"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${dmaapLogDirectory}/${errorLogName}.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${dmaapLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="dmaapAAIEventConsumerDebug"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${dmaapLogDirectory}/${debugLogName}.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${dmaapLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="dmaapAAIEventConsumerMetric"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${dmaapLogDirectory}/${metricsLogName}.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${dmaapLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <!-- Spring related loggers --> + <logger level="WARN" name="org.springframework" /> + <logger level="WARN" name="org.springframework.beans" /> + <logger level="WARN" name="org.springframework.web" /> + <logger level="WARN" name="com.blog.spring.jms" /> + <!-- AJSC Services (bootstrap services) --> + <logger level="WARN" name="ajsc" /> + <logger level="WARN" name="ajsc.RouteMgmtService" /> + <logger level="WARN" name="ajsc.ComputeService" /> + <logger level="WARN" name="ajsc.VandelayService" /> + <logger level="WARN" name="ajsc.FilePersistenceService" /> + <logger level="WARN" name="ajsc.UserDefinedJarService" /> + <logger level="WARN" name="ajsc.UserDefinedBeansDefService" /> + <logger level="WARN" name="ajsc.LoggingConfigurationService" /> + <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet + logging) --> + <logger level="WARN" name="ajsc.utils" /> + <logger level="WARN" name="ajsc.utils.DME2Helper" /> + <logger level="WARN" name="ajsc.filters" /> + <logger level="WARN" name="ajsc.beans.interceptors" /> + <logger level="WARN" name="ajsc.restlet" /> + <logger level="WARN" name="ajsc.servlet" /> + <logger level="WARN" name="com.att.ajsc" /> + <logger level="WARN" name="com.att.ajsc.csi.logging" /> + <logger level="WARN" name="com.att.ajsc.filemonitor" /> + <!-- Other Loggers that may help troubleshoot --> + <logger level="WARN" name="net.sf" /> + <logger level="WARN" name="org.apache.commons.httpclient" /> + <logger level="WARN" name="org.apache.commons" /> + <logger level="WARN" name="org.apache.coyote" /> + <logger level="WARN" name="org.apache.jasper" /> + <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. + May aid in troubleshooting) --> + <logger level="WARN" name="org.apache.camel" /> + <logger level="WARN" name="org.apache.cxf" /> + <logger level="WARN" name="org.apache.camel.processor.interceptor" /> + <logger level="WARN" name="org.apache.cxf.jaxrs.interceptor" /> + <logger level="WARN" name="org.apache.cxf.service" /> + <logger level="WARN" name="org.restlet" /> + <logger level="WARN" name="org.apache.camel.component.restlet" /> + <!-- logback internals logging --> + <logger level="WARN" name="ch.qos.logback.classic" /> + <logger level="WARN" name="ch.qos.logback.core" /> + <!-- logback jms appenders & loggers definition starts here --> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="auditLogs"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${perfLogsDirectory}/Audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${perfLogsDirectory}/Audit.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="perfLogs"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${perfLogsDirectory}/Perform.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${perfLogsDirectory}/Perform.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC-audit"> + <queueSize>${queueSize}</queueSize> + <includeCallerData>true</includeCallerData> + <discardingThreshold>0</discardingThreshold> + <appender-ref ref="Audit-Record-Queue" /> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC-perf"> + <queueSize>${queueSize}</queueSize> + <includeCallerData>true</includeCallerData> + <discardingThreshold>0</discardingThreshold> + <appender-ref ref="Performance-Tracker-Queue" /> + </appender> + <logger additivity="false" level="INFO" name="AuditRecord"> + <appender-ref ref="ASYNC-audit" /> + <appender-ref ref="auditLogs" /> + </logger> + <logger additivity="false" level="INFO" name="AuditRecord_DirectCall"> + <appender-ref ref="ASYNC-audit" /> + <appender-ref ref="auditLogs" /> + </logger> + <logger additivity="false" level="INFO" name="PerfTrackerRecord"> + <appender-ref ref="ASYNC-perf" /> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + <logger additivity="false" level="DEBUG" name="org.onap.aai.interceptors"> + <appender-ref ref="asynctranslog" /> + </logger> + <logger level="DEBUG" name="org.onap.aai.interceptors.PreAaiAjscInterceptor"> + <appender-ref ref="asyncAUDIT" /> + </logger> + <logger level="DEBUG" name="org.onap.aai.interceptors.PostAaiAjscInterceptor"> + <appender-ref ref="asyncAUDIT" /> + </logger> + <logger additivity="false" level="DEBUG" name="org.onap.aai.dmaap"> + <appender-ref ref="dmaapAAIEventConsumer" /> + <appender-ref ref="dmaapAAIEventConsumerDebug" /> + <appender-ref ref="dmaapAAIEventConsumerMetric" /> + </logger> + <logger level="WARN" name="org.apache" /> + <logger level="WARN" name="org.zookeeper" /> + <logger level="WARN" name="com.thinkaurelius" /> + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger additivity="false" level="WARN" name="com.att.eelf"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncAUDIT" /> + </logger> + <root level="INFO"> + <appender-ref ref="asyncDEBUG" /> + </root> +</configuration> diff --git a/kubernetes/aai/charts/aai-resources/templates/configmap.yaml b/kubernetes/aai/charts/aai-resources/templates/configmap.yaml new file mode 100644 index 0000000000..97c720a6ab --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/templates/configmap.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }} diff --git a/kubernetes/aai/charts/aai-resources/templates/deployment.yaml b/kubernetes/aai/charts/aai-resources/templates/deployment.yaml new file mode 100644 index 0000000000..6aef4475f7 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/templates/deployment.yaml @@ -0,0 +1,527 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ include "common.name" . }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + name: {{ include "common.name" . }} + annotations: + msb.onap.org/service-info: '[ + { + "serviceName": "_aai-cloudInfrastructure", + "version": "v11", + "url": "/aai/v11/cloud-infrastructure", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v11/cloud-infrastructure" + }, + { + "serviceName": "_aai-cloudInfrastructure", + "version": "v12", + "url": "/aai/v12/cloud-infrastructure", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v12/cloud-infrastructure" + }, + { + "serviceName": "_aai-cloudInfrastructure", + "version": "v13", + "url": "/aai/v13/cloud-infrastructure", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v13/cloud-infrastructure" + }, + { + "serviceName": "_aai-business", + "version": "v11", + "url": "/aai/v11/business", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v11/business" + }, + { + "serviceName": "_aai-business", + "version": "v12", + "url": "/aai/v12/business", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v12/business" + }, + { + "serviceName": "_aai-business", + "version": "v13", + "url": "/aai/v13/business", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v13/business" + }, + { + "serviceName": "_aai-actions", + "version": "v11", + "url": "/aai/v11/actions", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v11/actions" + }, + { + "serviceName": "_aai-actions", + "version": "v12", + "url": "/aai/v12/actions", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v12/actions" + }, + { + "serviceName": "_aai-actions", + "version": "v13", + "url": "/aai/v13/actions", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v13/actions" + }, + { + "serviceName": "_aai-service-design-and-creation", + "version": "v11", + "url": "/aai/v11/service-design-and-creation", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v11/service-design-and-creation" + }, + { + "serviceName": "_aai-service-design-and-creation", + "version": "v12", + "url": "/aai/v12/service-design-and-creation", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v12/service-design-and-creation" + }, + { + "serviceName": "_aai-service-design-and-creation", + "version": "v13", + "url": "/aai/v13/service-design-and-creation", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v13/service-design-and-creation" + }, + { + "serviceName": "_aai-network", + "version": "v11", + "url": "/aai/v11/network", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v11/network" + }, + { + "serviceName": "_aai-network", + "version": "v12", + "url": "/aai/v12/network", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v12/network" + }, + { + "serviceName": "_aai-network", + "version": "v13", + "url": "/aai/v13/network", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v13/network" + }, + { + "serviceName": "_aai-externalSystem", + "version": "v11", + "url": "/aai/v11/external-system", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v11/external-system" + }, + { + "serviceName": "_aai-externalSystem", + "version": "v12", + "url": "/aai/v12/external-system", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v12/external-system" + }, + { + "serviceName": "_aai-externalSystem", + "version": "v13", + "url": "/aai/v13/external-system", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1", + "path": "/aai/v13/external-system" + }, + { + "serviceName": "aai-cloudInfrastructure", + "version": "v11", + "url": "/aai/v11/cloud-infrastructure", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-cloudInfrastructure", + "version": "v12", + "url": "/aai/v12/cloud-infrastructure", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-cloudInfrastructure", + "version": "v13", + "url": "/aai/v13/cloud-infrastructure", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-business", + "version": "v11", + "url": "/aai/v11/business", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-business", + "version": "v12", + "url": "/aai/v12/business", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-business", + "version": "v13", + "url": "/aai/v13/business", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-actions", + "version": "v11", + "url": "/aai/v11/actions", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-actions", + "version": "v12", + "url": "/aai/v12/actions", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-actions", + "version": "v13", + "url": "/aai/v13/actions", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-service-design-and-creation", + "version": "v11", + "url": "/aai/v11/service-design-and-creation", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-service-design-and-creation", + "version": "v12", + "url": "/aai/v12/service-design-and-creation", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-service-design-and-creation", + "version": "v13", + "url": "/aai/v13/service-design-and-creation", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-network", + "version": "v11", + "url": "/aai/v11/network", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-network", + "version": "v12", + "url": "/aai/v12/network", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-network", + "version": "v13", + "url": "/aai/v13/network", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-externalSystem", + "version": "v11", + "url": "/aai/v11/external-system", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-externalSystem", + "version": "v12", + "url": "/aai/v12/external-system", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + }, + { + "serviceName": "aai-externalSystem", + "version": "v13", + "url": "/aai/v13/external-system", + "protocol": "REST", + "port": "8447", + "enable_ssl": true, + "lb_policy":"ip_hash", + "visualRange": "1" + } + ]' + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - aai-hbase + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }} + image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + env: + - name: CHEF_BRANCH + value: master + - name: AAI_CHEF_ENV + value: simpledemo + - name: AAI_CORE_VERSION + value: {{ .Values.config.aaicoreversion }} + - name: AAI_CHEF_LOC + value: /var/chef/aai-data/environments + - name: CHEF_GIT_URL + value: http://gerrit.onap.org/r/aai + - name: HBASE_STARTUP_ARTIFICIAL_DELAY + value: "60" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb + subPath: solo.rb + name: aai-chef-config + - mountPath: /var/chef/aai-data/environments/ + name: aai-data + - mountPath: /var/log/onap + name: aai-resources-logs + - mountPath: /opt/app/aai-resources/bundleconfig/etc/logback.xml + name: aai-resources-log-conf + subPath: logback.xml + ports: + - containerPort: {{ .Values.service.internalPort }} + - containerPort: {{ .Values.service.internalPort2 }} + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{ if .Values.liveness.enabled }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ toYaml .Values.resources | indent 10 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + + # side car containers + - name: filebeat-onap + image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + volumeMounts: + - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml + name: filebeat-conf + - mountPath: /var/log/onap + name: aai-resources-logs + - mountPath: /usr/share/filebeat/data + name: aai-resources-filebeat + + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: aai-chef-config + configMap: + name: aai-chef-config + - name: aai-data + configMap: + name: aai-resources-environments + - name: filebeat-conf + configMap: + name: aai-filebeat + - name: aai-resources-logs + emptyDir: {} + - name: aai-resources-filebeat + emptyDir: {} + - name: aai-resources-log-conf + configMap: + name: {{ include "common.fullname" . }} + restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-resources/templates/service.yaml b/kubernetes/aai/charts/aai-resources/templates/service.yaml new file mode 100644 index 0000000000..8cea86cf54 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/templates/service.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.name" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.name }} + - port: {{ .Values.service.internalPort2 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} + name: {{ .Values.service.name }}2 + {{- else -}} + - port: {{ .Values.service.internalPort }} + name: {{ .Values.service.name }} + - port: {{ .Values.service.internalPort2 }} + name: {{ .Values.service.name }}2 + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + clusterIP: None diff --git a/kubernetes/aai/charts/aai-resources/values.yaml b/kubernetes/aai/charts/aai-resources/values.yaml new file mode 100644 index 0000000000..f72e29905f --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/values.yaml @@ -0,0 +1,68 @@ +# Default values for resources. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +global: # global defaults + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.1.0 + + +# application image +repository: nexus3.onap.org:10001 +image: openecomp/aai-resources:v1.1.0 +pullPolicy: Always +restartPolicy: Always + +# application configuration +config: + aaicoreversion: 1.1.0-SNAPSHOT + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 60 + periodSeconds: 60 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: false + +readiness: + initialDelaySeconds: 60 + periodSeconds: 10 + + +service: + type: ClusterIP + name: aai-resources + internalPort: 8447 + internalPort2: 5005 + + +ingress: + enabled: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi |