Merge "[SDC] Use Startup probes"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Thu, 13 May 2021 09:34:03 +0000 (09:34 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 13 May 2021 09:34:03 +0000 (09:34 +0000)
1  2 
kubernetes/sdc/components/sdc-be/values.yaml
kubernetes/sdc/components/sdc-fe/values.yaml
kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml
kubernetes/sdc/components/sdc-onboarding-be/values.yaml
kubernetes/sdc/components/sdc-wfd-be/values.yaml
kubernetes/sdc/components/sdc-wfd-fe/values.yaml

@@@ -63,9 -63,9 +63,9 @@@ certInitializer
    truststoreFile: "org.onap.sdc.trust.jks"
    permission_user: 352070
    permission_group: 35953
 -  aaf_add_config: >
 -    /opt/app/aaf_config/bin/agent.sh local showpass
 -    {{.Values.fqi}} {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop
 +  aaf_add_config: |
 +    echo "cadi_keystore_password_p12=$cadi_keystore_password_p12" > {{ .Values.credsPath }}/mycreds.prop
 +    echo "cadi_truststore_password=$cadi_truststore_password" >> {{ .Values.credsPath }}/mycreds.prop
  
  #################################################################
  # SDC Config part
@@@ -83,18 -83,29 +83,29 @@@ affinity: {
  
  # probe configuration parameters
  liveness:
-   initialDelaySeconds: 120
+   initialDelaySeconds: 1
    periodSeconds: 10
    timeoutSeconds: 5
+   successThreshold: 1
+   failureThreshold: 3
    # necessary to disable liveness probe when setting breakpoints
    # in debugger so K8s doesn't restart unresponsive container
    port: api
    enabled: true
  
  readiness:
-   initialDelaySeconds: 60
+   initialDelaySeconds: 1
    periodSeconds: 10
    timeoutSeconds: 5
+   successThreshold: 1
+   failureThreshold: 3
+ startup:
+   initialDelaySeconds: 10
+   periodSeconds: 10
+   timeoutSeconds: 5
+   successThreshold: 1
+   failureThreshold: 60
  
  service:
    type: NodePort
@@@ -39,9 -39,9 +39,9 @@@ certInitializer
    truststoreFile: "org.onap.sdc.trust.jks"
    permission_user: 352070
    permission_group: 35953
 -  aaf_add_config: >
 -    /opt/app/aaf_config/bin/agent.sh local showpass
 -    {{.Values.fqi}} {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop
 +  aaf_add_config: |
 +    echo "cadi_keystore_password_p12=$cadi_keystore_password_p12" > {{ .Values.credsPath }}/mycreds.prop
 +    echo "cadi_truststore_password=$cadi_truststore_password" >> {{ .Values.credsPath }}/mycreds.prop
  
  #################################################################
  # Application configuration defaults.
@@@ -76,17 -76,28 +76,28 @@@ affinity: {
  
  # probe configuration parameters
  liveness:
-   initialDelaySeconds: 10
-   periodSeconds: 60
+   initialDelaySeconds: 1
+   periodSeconds: 10
    timeoutSeconds: 15
+   successThreshold: 1
+   failureThreshold: 3
    # necessary to disable liveness probe when setting breakpoints
    # in debugger so K8s doesn't restart unresponsive container
    enabled: true
  
  readiness:
+   initialDelaySeconds: 1
+   periodSeconds: 10
+   timeoutSeconds: 15
+   successThreshold: 1
+   failureThreshold: 3
+ startup:
    initialDelaySeconds: 10
-   periodSeconds: 60
+   periodSeconds: 10
    timeoutSeconds: 15
+   successThreshold: 1
+   failureThreshold: 60
  
  service:
    #Example service definition with external, internal and node ports.
@@@ -93,7 -93,7 +93,7 @@@ spec
              memory: 20Mi
        {{- end }}
        - name: volume-permissions
 -        image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
 +        image: {{ include "repositoryGenerator.image.busybox" . }}
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          command:
            - sh
              initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
              periodSeconds: {{ .Values.liveness.periodSeconds }}
              timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+             successThreshold: {{ .Values.liveness.successThreshold }}
+             failureThreshold: {{ .Values.liveness.failureThreshold }}
            {{ end }}
            readinessProbe:
              exec:
                - "/var/lib/jetty/ready-probe.sh"
              initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
              periodSeconds: {{ .Values.readiness.periodSeconds }}
-             timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+             timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
+             successThreshold: {{ .Values.readiness.successThreshold }}
+             failureThreshold: {{ .Values.readiness.failureThreshold }}
+           startupProbe:
+             exec:
+               command:
+               - "/var/lib/jetty/ready-probe.sh"
+             initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
+             periodSeconds: {{ .Values.startup.periodSeconds }}
+             timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
+             successThreshold: {{ .Values.startup.successThreshold }}
+             failureThreshold: {{ .Values.startup.failureThreshold }}
            resources: {{ include "common.resources" . | nindent 12 }}
            env:
            - name: ENVNAME
@@@ -51,9 -51,9 +51,9 @@@ certInitializer
    truststoreFile: "org.onap.sdc.trust.jks"
    permission_user: 352070
    permission_group: 35953
 -  aaf_add_config: >
 -    /opt/app/aaf_config/bin/agent.sh local showpass
 -    {{.Values.fqi}} {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop
 +  aaf_add_config: |
 +    echo "cadi_keystore_password_p12=$cadi_keystore_password_p12" > {{ .Values.credsPath }}/mycreds.prop
 +    echo "cadi_truststore_password=$cadi_truststore_password" >> {{ .Values.credsPath }}/mycreds.prop
  
  #################################################################
  # Application configuration defaults.
@@@ -83,17 -83,28 +83,28 @@@ affinity: {
  
  # probe configuration parameters
  liveness:
-   initialDelaySeconds: 120
-   periodSeconds: 60
+   initialDelaySeconds: 1
+   periodSeconds: 10
    timeoutSeconds: 15
+   successThreshold: 1
+   failureThreshold: 3
    # necessary to disable liveness probe when setting breakpoints
    # in debugger so K8s doesn't restart unresponsive container
    enabled: true
  
  readiness:
-   initialDelaySeconds: 120
-   periodSeconds: 60
+   initialDelaySeconds: 1
+   periodSeconds: 10
    timeoutSeconds: 15
+   successThreshold: 1
+   failureThreshold: 3
+ startup:
+   initialDelaySeconds: 10
+   periodSeconds: 10
+   timeoutSeconds: 15
+   successThreshold: 1
+   failureThreshold: 60
  
  service:
    type: ClusterIP
@@@ -50,9 -50,9 +50,9 @@@ certInitializer
    truststoreFile: "org.onap.sdc.trust.jks"
    permission_user: 352070
    permission_group: 35953
 -  aaf_add_config: >
 -    /opt/app/aaf_config/bin/agent.sh local showpass
 -    {{.Values.fqi}} {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop
 +  aaf_add_config: |
 +    echo "cadi_keystore_password_p12=$cadi_keystore_password_p12" > {{ .Values.credsPath }}/mycreds.prop
 +    echo "cadi_truststore_password=$cadi_truststore_password" >> {{ .Values.credsPath }}/mycreds.prop
  
  #################################################################
  # Application configuration defaults.
@@@ -101,6 -101,28 +101,28 @@@ readiness
    initialDelaySeconds: 60
    periodSeconds: 10
  
+ # probe configuration parameters
+ liveness:
+   initialDelaySeconds: 1
+   periodSeconds: 10
+   successThreshold: 1
+   failureThreshold: 3
+   # necessary to disable liveness probe when setting breakpoints
+   # in debugger so K8s doesn't restart unresponsive container
+   enabled: true
+ readiness:
+   initialDelaySeconds: 1
+   periodSeconds: 10
+   successThreshold: 1
+   failureThreshold: 3
+ startup:
+   initialDelaySeconds: 10
+   periodSeconds: 10
+   successThreshold: 1
+   failureThreshold: 60
  service:
    type: NodePort
    portName: sdc-wfd-be
@@@ -39,9 -39,9 +39,9 @@@ certInitializer
    truststoreFile: "org.onap.sdc.trust.jks"
    permission_user: 352070
    permission_group: 35953
 -  aaf_add_config: >
 -    /opt/app/aaf_config/bin/agent.sh local showpass
 -    {{.Values.fqi}} {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop
 +  aaf_add_config: |
 +    echo "cadi_keystore_password_p12=$cadi_keystore_password_p12" > {{ .Values.credsPath }}/mycreds.prop
 +    echo "cadi_truststore_password=$cadi_truststore_password" >> {{ .Values.credsPath }}/mycreds.prop
  
  #################################################################
  # Application configuration defaults.
@@@ -77,15 -77,25 +77,25 @@@ affinity: {
  
  # probe configuration parameters
  liveness:
-   initialDelaySeconds: 60
+   initialDelaySeconds: 1
    periodSeconds: 10
+   successThreshold: 1
+   failureThreshold: 3
    # necessary to disable liveness probe when setting breakpoints
    # in debugger so K8s doesn't restart unresponsive container
    enabled: true
  
  readiness:
-   initialDelaySeconds: 60
+   initialDelaySeconds: 1
    periodSeconds: 10
+   successThreshold: 1
+   failureThreshold: 3
+ startup:
+   initialDelaySeconds: 10
+   periodSeconds: 10
+   successThreshold: 1
+   failureThreshold: 60
  
  service:
    type: NodePort