@@ -687,6 +687,51 @@ ifdef::openshift-enterprise[]
687
687
endif::[]
688
688
----
689
689
690
+ endif::[]
691
+ [[configuring-quota-notification-messages]]
692
+ == Configuring Quota Notification Messages
693
+
694
+ Whenever a user reaches a quota, a quota notification is put into the notification drawer.
695
+ A custom quota notification message, per
696
+ xref:../dev_guide/compute_resources.adoc#dev-managed-by-quota[quota resource type], can be added to the notification. For example:
697
+ "Your project is over quota. It is using 200% of 2 cores CPU (Limit). Upgrade to <a href='http://www.openshift.com'>
698
+ OpenShift Pro</a> if you need additional resources.". The "Upgrade to..." part of the notification is the custom
699
+ message and may contain HTML such as links to additional resources.
700
+
701
+ . Create the following configuration scripts within a file (for example,
702
+ *_quota-messages.js_*):
703
+ +
704
+ [source, javascript]
705
+ ----
706
+ // Set custom notification messages per quota type/key
707
+ window.OPENSHIFT_CONSTANTS.QUOTA_NOTIFICATION_MESSAGE = {
708
+ "pods": 'Upgrade to <a href="http://www.openshift.com">OpenShift Pro</a> if you need additional resources.',
709
+ "limits.memory": 'Upgrade to <a href="http://www.openshift.com">OpenShift Online Pro</a> if you need additional resources.'
710
+ }
711
+ ----
712
+
713
+ . Save the file and add it to the master configuration at
714
+ *_/etc/origin/master/master-config.yaml_*:
715
+ +
716
+ [source, yaml]
717
+ ----
718
+ assetConfig:
719
+ ...
720
+ extensionScripts:
721
+ - /path/to/quota-messages.js
722
+ ----
723
+
724
+ . Restart the master host:
725
+ +
726
+ ----
727
+ ifdef::openshift-origin[]
728
+ # systemctl restart origin-master
729
+ endif::[]
730
+ ifdef::openshift-enterprise[]
731
+ # systemctl restart atomic-openshift-master
732
+ endif::[]
733
+ ----
734
+
690
735
endif::[]
691
736
692
737
[[configuring-the-create-from-url-namespace-whitelist]]
@@ -1013,4 +1058,4 @@ xref:../install_config/install/advanced_install.adoc#advanced-install-configurin
1013
1058
# Configure loggingPublicURL in the master config for aggregate logging. Ansible is also able to install logging for you.
1014
1059
# See: https://docs.openshift.com/enterprise/latest/install_config/aggregate_logging.html
1015
1060
#openshift_master_logging_public_url=https://kibana.example.com
1016
- ----
1061
+ ----
0 commit comments