Module: Pangea::Kubernetes::NetworkBackends::Base::ClassMethods

Defined in:
lib/pangea/kubernetes/network_backends/base.rb

Instance Method Summary collapse

Instance Method Details

#backend_nameSymbol

Returns Backend identifier (:vpc_cni, :cilium, :calico, :flannel).

Returns:

  • (Symbol)

    Backend identifier (:vpc_cni, :cilium, :calico, :flannel)

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/pangea/kubernetes/network_backends/base.rb', line 27

def backend_name
  raise NotImplementedError, "#{self} must implement .backend_name"
end

#compatible_backendsArray<Symbol>

Returns Compatible compute backends (:aws, :gcp, :azure, :hcloud, etc.).

Returns:

  • (Array<Symbol>)

    Compatible compute backends (:aws, :gcp, :azure, :hcloud, etc.)

Raises:

  • (NotImplementedError)


32
33
34
# File 'lib/pangea/kubernetes/network_backends/base.rb', line 32

def compatible_backends
  raise NotImplementedError, "#{self} must implement .compatible_backends"
end

#create_network_iam(_ctx, _name, _config, _tags) ⇒ Hash?

Create cloud-level IAM resources for the CNI (e.g., IRSA for Cilium operator). Returns nil if no cloud IAM is needed.

Parameters:

  • ctx (Object)

    Synthesizer context

  • name (Symbol)

    Cluster name

  • config (Hash)

    Network configuration

  • tags (Hash)

    Resource tags

Returns:

  • (Hash, nil)

    IAM resources created



54
55
56
# File 'lib/pangea/kubernetes/network_backends/base.rb', line 54

def create_network_iam(_ctx, _name, _config, _tags)
  nil # Most network backends don't need cloud IAM
end

#helm_values(_config) ⇒ Hash

Return Helm values or configuration to be passed to the GitOps layer. This is what gets deployed via FluxCD HelmRelease.

Parameters:

  • config (Hash)

    Network configuration

Returns:

  • (Hash)

    Configuration for the network backend’s Helm chart



71
72
73
# File 'lib/pangea/kubernetes/network_backends/base.rb', line 71

def helm_values(_config)
  {}
end

#l7_observable?Boolean

Returns Whether this backend provides L7 observability (e.g., Hubble).

Returns:

  • (Boolean)

    Whether this backend provides L7 observability (e.g., Hubble)



42
43
44
# File 'lib/pangea/kubernetes/network_backends/base.rb', line 42

def l7_observable?
  false
end

#mesh_capable?Boolean

Returns Whether this backend provides service mesh capabilities.

Returns:

  • (Boolean)

    Whether this backend provides service mesh capabilities



37
38
39
# File 'lib/pangea/kubernetes/network_backends/base.rb', line 37

def mesh_capable?
  false
end

#nixos_profileString?

Return the NixOS/blackmatter-kubernetes profile name for this backend. Used by NixOS backends in cloud-init to select the correct CNI config.

Returns:

  • (String, nil)

    Profile name (e.g., ‘cilium-mesh’, ‘flannel-production’)



62
63
64
# File 'lib/pangea/kubernetes/network_backends/base.rb', line 62

def nixos_profile
  nil # Managed backends (EKS/GKE/AKS) don't use NixOS profiles
end