Class Rule

  • All Implemented Interfaces:
    io.fabric8.kubernetes.api.builder.Editable<RuleBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource, Serializable

    @Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator")
    public class Rule
    extends Object
    implements io.fabric8.kubernetes.api.builder.Editable<RuleBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
    Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule
    See Also:
    Serialized Form
    • Constructor Detail

      • Rule

        public Rule()
        No args constructor for use in serialization
    • Method Detail

      • getAlert

        public String getAlert()
        Name of the alert. Must be a valid label value. Only one of `record` and `alert` must be set.
      • setAlert

        public void setAlert​(String alert)
        Name of the alert. Must be a valid label value. Only one of `record` and `alert` must be set.
      • getAnnotations

        public Map<String,​String> getAnnotations()
        Annotations to add to each alert. Only valid for alerting rules.
      • setAnnotations

        public void setAnnotations​(Map<String,​String> annotations)
        Annotations to add to each alert. Only valid for alerting rules.
      • getExpr

        public io.fabric8.kubernetes.api.model.IntOrString getExpr()
        Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule
      • setExpr

        public void setExpr​(io.fabric8.kubernetes.api.model.IntOrString expr)
        Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule
      • getFor

        public String getFor()
        Alerts are considered firing once they have been returned for this long.
      • setFor

        public void setFor​(String _for)
        Alerts are considered firing once they have been returned for this long.
      • getKeepFiringFor

        public String getKeepFiringFor()
        KeepFiringFor defines how long an alert will continue firing after the condition that triggered it has cleared.
      • setKeepFiringFor

        public void setKeepFiringFor​(String keepFiringFor)
        KeepFiringFor defines how long an alert will continue firing after the condition that triggered it has cleared.
      • getLabels

        public Map<String,​String> getLabels()
        Labels to add or overwrite.
      • setLabels

        public void setLabels​(Map<String,​String> labels)
        Labels to add or overwrite.
      • getRecord

        public String getRecord()
        Name of the time series to output to. Must be a valid metric name. Only one of `record` and `alert` must be set.
      • setRecord

        public void setRecord​(String record)
        Name of the time series to output to. Must be a valid metric name. Only one of `record` and `alert` must be set.
      • edit

        public RuleBuilder edit()
        Specified by:
        edit in interface io.fabric8.kubernetes.api.builder.Editable<RuleBuilder>
      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)