rename k8s ingress path macro
This commit is contained in:
parent
1d6cc670df
commit
5482009948
@ -1,4 +1,4 @@
|
||||
use harmony_macros::k8s_ingress_path;
|
||||
use harmony_macros::ingress_path;
|
||||
use k8s_openapi::api::networking::v1::Ingress;
|
||||
use serde::Serialize;
|
||||
use serde_json::json;
|
||||
@ -45,7 +45,7 @@ impl<T: Topology + K8sclient> Score<T> for K8sIngressScore {
|
||||
fn create_interpret(&self) -> Box<dyn Interpret<T>> {
|
||||
let path = match self.path.clone() {
|
||||
Some(p) => p,
|
||||
None => k8s_ingress_path!("/"),
|
||||
None => ingress_path!("/"),
|
||||
};
|
||||
|
||||
let path_type = match self.path_type.clone() {
|
||||
|
@ -2,7 +2,7 @@ use convert_case::{Case, Casing};
|
||||
use dockerfile_builder::instruction::{CMD, COPY, ENV, EXPOSE, FROM, RUN, WORKDIR};
|
||||
use dockerfile_builder::{Dockerfile, instruction_builder::EnvBuilder};
|
||||
use fqdn::fqdn;
|
||||
use harmony_macros::k8s_ingress_path;
|
||||
use harmony_macros::ingress_path;
|
||||
use non_blank_string_rs::NonBlankString;
|
||||
use serde_json::json;
|
||||
use std::collections::HashMap;
|
||||
@ -144,7 +144,7 @@ impl<T: Topology + K8sclient + HelmCommand> Interpret<T> for LAMPInterpret {
|
||||
.as_str()
|
||||
),
|
||||
port: 8080,
|
||||
path: Some(k8s_ingress_path!("/")),
|
||||
path: Some(ingress_path!("/")),
|
||||
path_type: None,
|
||||
namespace: self
|
||||
.get_namespace()
|
||||
|
@ -120,7 +120,7 @@ pub fn yaml(input: TokenStream) -> TokenStream {
|
||||
/// Verify that a string is a valid(ish) kubernetes path
|
||||
/// Panics if path does not start with `/`
|
||||
#[proc_macro]
|
||||
pub fn k8s_ingress_path(input: TokenStream) -> TokenStream {
|
||||
pub fn ingress_path(input: TokenStream) -> TokenStream {
|
||||
let input = parse_macro_input!(input as LitStr);
|
||||
let path_str = input.value();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user