Class: Kubes::Compiler::Dsl::Syntax::Ingress

Inherits:
Resource
  • Object
show all
Defined in:
lib/kubes/compiler/dsl/syntax/ingress.rb

Instance Attribute Summary

Attributes inherited from Resource

#kind_from_block

Instance Method Summary collapse

Methods inherited from Resource

#default_kind, #default_metadata, #default_result, #default_result_append, #default_top, #field, #top

Methods included from Util::Normalize

#extract_type, #normalize_kind

Instance Method Details

#default_apiVersionObject



15
16
17
# File 'lib/kubes/compiler/dsl/syntax/ingress.rb', line 15

def default_apiVersion
  "networking.k8s.io/v1beta1"
end

#default_pathsObject



31
32
33
34
35
36
37
38
39
# File 'lib/kubes/compiler/dsl/syntax/ingress.rb', line 31

def default_paths
  [
    path: '/*',
    backend: {
      serviceName: serviceName,
      servicePort: servicePort,
    }
  ]
end

#default_rulesObject



23
24
25
26
27
28
29
# File 'lib/kubes/compiler/dsl/syntax/ingress.rb', line 23

def default_rules
  [
    http: {
      paths: paths
    }
  ]
end

#default_specObject



19
20
21
# File 'lib/kubes/compiler/dsl/syntax/ingress.rb', line 19

def default_spec
  { rules: rules }
end