Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error when choosing native_packaging = package #47

Open
rwaffen opened this issue Apr 19, 2023 · 1 comment
Open

compile error when choosing native_packaging = package #47

rwaffen opened this issue Apr 19, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rwaffen
Copy link
Member

rwaffen commented Apr 19, 2023

when i run this:

k8s::server::node_on_server: true
k8s::server::generate_ca: true
k8s::server::etcd::generate_ca: true
k8s::server::manage_kubeadm: true
k8s::server::apiserver::advertise_address: "%{facts.networking.interfaces.enp0s8.ip}"
k8s::server::resources::manage_flannel: false
    class { 'k8s':
      container_manager    => 'containerd',
      etcd_version         => '3.3.25',
      manage_firewall      => true,
      manage_kube_proxy    => true,
      master               => 'https://controller-0.example.com:6443',
      role                 => 'server',
      version              => '1.25.6',
      service_cluster_cidr => '172.20.0.0/20',
      cluster_cidr         => '172.20.16.0/20',
      puppetdb_discovery   => true,
      native_packaging     => 'package',
    }

i get this:

root@controller-0:~# puppet agent -t
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: 
Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: 
Error while evaluating a Resource Statement, 
Cannot alias Package[kubernetes-kube-controller-manager] to [nil, "kubernetes-server", nil] at 
(file: /etc/puppetlabs/code/environments/production/modules/k8s/manifests/binary.pp, line: 42); 
resource ["Package", nil, "kubernetes-server", nil] already declared (file: /etc/puppetlabs/code/environments/production/modules/k8s/manifests/binary.pp, line: 42) 
(file: /etc/puppetlabs/code/environments/production/modules/k8s/manifests/binary.pp, line: 42, column: 7) 
(file: /etc/puppetlabs/code/environments/production/modules/k8s/manifests/server/controller_manager.pp, line: 20) on node controller-0.example.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

i think this might somehow connect to the k8s::binary define and with setting a different title and name for the package resource in it. but i don't know how to fix it, because i don't know why title and name are different in the first place.

package { "kubernetes-${name}":
ensure => $ensure,
name => $_name,
}

used os:

root@controller-0:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
@rwaffen rwaffen added the bug Something isn't working label Apr 19, 2023
@rwaffen rwaffen changed the title compilte error when choosing native_packaging = package compile error when choosing native_packaging = package Apr 19, 2023
@rwaffen
Copy link
Member Author

rwaffen commented Jul 5, 2023

switched to loose for native_packaging and then use packages only for etcd and cni_plugins. I mirrored the k8s binaries internally and changed the native_url_template

k8s::server::etcd::setup::install: package
k8s::install::cni_plugins::method: package

so this is working for me right now. but the problem still not solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants