Telemetry: enable publishing of events for core OpenStack Components
This PS enables publishing of events for core OpenStack Components Change-Id: I846bfa86ae522c103e741b46e189695d45ca7710
This commit is contained in:
parent
e6fff4b625
commit
16a250509a
21
cinder/templates/bin/_volume-usage-audit.sh.tpl
Normal file
21
cinder/templates/bin/_volume-usage-audit.sh.tpl
Normal file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
{{/*
|
||||
Copyright 2017 The Openstack-Helm Authors.
|
||||
|
||||
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.
|
||||
*/}}
|
||||
|
||||
set -ex
|
||||
|
||||
exec cinder-volume-usage-audit --send_actions
|
@ -47,6 +47,8 @@ data:
|
||||
{{ tuple "bin/_cinder-volume.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
ceph-keyring.sh: |+
|
||||
{{ tuple "bin/_ceph-keyring.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
volume-usage-audit.sh: |+
|
||||
{{ tuple "bin/_volume-usage-audit.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
bootstrap.sh: |+
|
||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
|
74
cinder/templates/cron-job-cinder-volume-usage-audit.yaml
Normal file
74
cinder/templates/cron-job-cinder-volume-usage-audit.yaml
Normal file
@ -0,0 +1,74 @@
|
||||
{{/*
|
||||
Copyright 2017 The Openstack-Helm Authors.
|
||||
|
||||
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.
|
||||
*/}}
|
||||
|
||||
{{- if .Values.manifests.cron_volume_usage_audit }}
|
||||
{{- if .Capabilities.APIVersions.Has "batch/v2alpha1" }}
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.volume_usage_audit }}
|
||||
{{- $mounts_cinder_volume_usage_audit := .Values.pod.mounts.cinder_volume_usage_audit.cinder_volume_usage_audit }}
|
||||
{{- $mounts_cinder_volume_usage_audit_init := .Values.pod.mounts.cinder_volume_usage_audit.init_container }}
|
||||
apiVersion: batch/v2alpha1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: cinder-volume-usage-audit
|
||||
spec:
|
||||
schedule: {{ .Values.jobs.volume_usage_audit.cron | quote }}
|
||||
concurrencyPolicy: Forbid
|
||||
jobTemplate:
|
||||
metadata:
|
||||
labels:
|
||||
{{ tuple $envAll "cinder" "volume-usage-audit" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_cinder_volume_usage_audit_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }}
|
||||
restartPolicy: OnFailure
|
||||
nodeSelector:
|
||||
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||
containers:
|
||||
- name: cinder-volume-usage-audit
|
||||
image: {{ .Values.images.volume_usage_audit }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.jobs.volume_usage_audit | include "helm-toolkit.snippets.kubernetes_resources" | indent 14 }}
|
||||
command:
|
||||
- /tmp/volume-usage-audit.sh
|
||||
volumeMounts:
|
||||
- name: etccinder
|
||||
mountPath: /etc/cinder
|
||||
- name: cinder-etc
|
||||
mountPath: /etc/cinder/cinder.conf
|
||||
subPath: cinder.conf
|
||||
readOnly: true
|
||||
- name: cinder-bin
|
||||
mountPath: /tmp/volume-usage-audit.sh
|
||||
subPath: volume-usage-audit.sh
|
||||
readOnly: true
|
||||
{{ if $mounts_cinder_volume_usage_audit.volumeMounts }}{{ toYaml $mounts_cinder_volume_usage_audit.volumeMounts | indent 14 }}{{ end }}
|
||||
volumes:
|
||||
- name: etccinder
|
||||
emptyDir: {}
|
||||
- name: cinder-etc
|
||||
configMap:
|
||||
name: cinder-etc
|
||||
defaultMode: 0444
|
||||
- name: cinder-bin
|
||||
configMap:
|
||||
name: cinder-bin
|
||||
defaultMode: 0555
|
||||
{{ if $mounts_cinder_volume_usage_audit.volumes }}{{ toYaml $mounts_cinder_volume_usage_audit.volumes | indent 10 }}{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -37,10 +37,15 @@ images:
|
||||
bootstrap: docker.io/kolla/ubuntu-source-heat-engine:3.0.3
|
||||
scheduler: docker.io/kolla/ubuntu-source-cinder-scheduler:3.0.3
|
||||
volume: docker.io/kolla/ubuntu-source-cinder-volume:3.0.3
|
||||
volume_usage_audit: docker.io/kolla/ubuntu-source-cinder-volume:3.0.3
|
||||
backup: docker.io/kolla/ubuntu-source-cinder-backup:3.0.3
|
||||
dep_check: docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0
|
||||
pull_policy: "IfNotPresent"
|
||||
|
||||
jobs:
|
||||
volume_usage_audit:
|
||||
cron: "*/5 * * * *"
|
||||
|
||||
pod:
|
||||
user:
|
||||
cinder:
|
||||
@ -61,6 +66,9 @@ pod:
|
||||
cinder_volume:
|
||||
init_container: null
|
||||
cinder_volume:
|
||||
cinder_volume_usage_audit:
|
||||
init_container: null
|
||||
cinder_volume_usage_audit:
|
||||
cinder_backup:
|
||||
init_container: null
|
||||
cinder_backup:
|
||||
@ -110,6 +118,13 @@ pod:
|
||||
memory: "1024Mi"
|
||||
cpu: "2000m"
|
||||
jobs:
|
||||
volume_usage_audit:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "2000m"
|
||||
bootstrap:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
@ -390,6 +405,8 @@ conf:
|
||||
memcache_security_strategy: ENCRYPT
|
||||
oslo_concurrency:
|
||||
lock_path: "/var/lib/cinder/tmp"
|
||||
oslo_messaging_notifications:
|
||||
driver: messagingv2
|
||||
backends:
|
||||
# Those options will be written to backends.conf as-is.
|
||||
rbd1:
|
||||
@ -462,6 +479,16 @@ dependencies:
|
||||
endpoint: internal
|
||||
- service: volume
|
||||
endpoint: internal
|
||||
volume_usage_audit:
|
||||
jobs:
|
||||
- cinder-db-sync
|
||||
- cinder-ks-user
|
||||
- cinder-ks-endpoints
|
||||
services:
|
||||
- service: identity
|
||||
endpoint: internal
|
||||
- service: volume
|
||||
endpoint: internal
|
||||
scheduler:
|
||||
jobs:
|
||||
- cinder-db-sync
|
||||
@ -656,6 +683,7 @@ endpoints:
|
||||
manifests:
|
||||
configmap_bin: true
|
||||
configmap_etc: true
|
||||
cron_volume_usage_audit: true
|
||||
deployment_api: true
|
||||
deployment_backup: true
|
||||
deployment_scheduler: true
|
||||
|
@ -199,7 +199,9 @@ conf:
|
||||
paste_deploy:
|
||||
flavor: keystone
|
||||
database:
|
||||
connection: null
|
||||
max_retries: -1
|
||||
oslo_messaging_notifications:
|
||||
driver: messagingv2
|
||||
paste_registry:
|
||||
pipeline:glance-registry:
|
||||
pipeline: healthcheck osprofiler unauthenticated-context registryapp
|
||||
@ -233,7 +235,9 @@ conf:
|
||||
paste_deploy:
|
||||
flavor: keystone
|
||||
database:
|
||||
connection: null
|
||||
max_retries: -1
|
||||
oslo_messaging_notifications:
|
||||
driver: messagingv2
|
||||
swift_store:
|
||||
override:
|
||||
append:
|
||||
|
@ -213,6 +213,8 @@ conf:
|
||||
endpoint_type: internalURL
|
||||
clients_keystone:
|
||||
endpoint_type: internalURL
|
||||
oslo_messaging_notifications:
|
||||
driver: messagingv2
|
||||
|
||||
network:
|
||||
api:
|
||||
|
@ -675,8 +675,7 @@ conf:
|
||||
agent:
|
||||
root_helper: sudo /var/lib/kolla/venv/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
||||
oslo_messaging_notifications:
|
||||
driver:
|
||||
- noop
|
||||
driver: messagingv2
|
||||
nova:
|
||||
auth_type: password
|
||||
auth_version: v3
|
||||
|
@ -619,6 +619,9 @@ conf:
|
||||
allow_resize_to_same_host: true
|
||||
compute_driver: libvirt.LibvirtDriver
|
||||
my_ip: 0.0.0.0
|
||||
instance_usage_audit: True
|
||||
instance_usage_audit_period: hour
|
||||
notify_on_state_change: vm_and_task_state
|
||||
vnc:
|
||||
novncproxy_host: 0.0.0.0
|
||||
novncproxy_port: 6080
|
||||
@ -668,6 +671,8 @@ conf:
|
||||
backend: oslo_cache.memcache_pool
|
||||
wsgi:
|
||||
api_paste_config: /etc/nova/api-paste.ini
|
||||
oslo_messaging_notifications:
|
||||
driver: messagingv2
|
||||
|
||||
# Names of secrets used by bootstrap and environmental checks
|
||||
secrets:
|
||||
|
Loading…
Reference in New Issue
Block a user