6 changes: 6 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM puppet/pdk:latest

# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/puppet
{
"name": "Puppet Development Kit (Community)",
"dockerFile": "Dockerfile",

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"puppet.puppet-vscode",
"rebornix.Ruby"
]

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pdk --version",
}
18 changes: 18 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM gitpod/workspace-full
RUN sudo wget https://apt.puppet.com/puppet-tools-release-bionic.deb && \
wget https://apt.puppetlabs.com/puppet6-release-bionic.deb && \
sudo dpkg -i puppet6-release-bionic.deb && \
sudo dpkg -i puppet-tools-release-bionic.deb && \
sudo apt-get update && \
sudo apt-get install -y pdk zsh puppet-agent && \
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/*
RUN sudo usermod -s $(which zsh) gitpod && \
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
echo "plugins=(git gitignore github gem pip bundler python ruby docker docker-compose)" >> /home/gitpod/.zshrc && \
echo 'PATH="$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin"' >> /home/gitpod/.zshrc && \
sudo /opt/puppetlabs/puppet/bin/gem install puppet-debugger hub -N && \
mkdir -p /home/gitpod/.config/puppet && \
/opt/puppetlabs/puppet/bin/ruby -r yaml -e "puts ({'disabled' => true}).to_yaml" > /home/gitpod/.config/puppet/analytics.yml
RUN rm -f puppet6-release-bionic.deb puppet-tools-release-bionic.deb
ENTRYPOINT /usr/bin/zsh
9 changes: 9 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
image:
file: .gitpod.Dockerfile

tasks:
- init: pdk bundle install

vscode:
extensions:
- puppet.puppet-vscode@1.0.0:oSzfTkDf6Cmc1jOjgW33VA==
2 changes: 2 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
/.gitignore
/.gitlab-ci.yml
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
Expand All @@ -40,3 +41,4 @@
/.yardopts
/spec/
/.vscode/
/.sync.yml
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Style/BlockDelimiters:
Style/BracesAroundHashParameters:
Description: Braces are required by Ruby 2.7. Cop removed from RuboCop v0.80.0.
See https://github.com/rubocop-hq/rubocop/pull/7643
Enabled: true
Enabled: false
Style/ClassAndModuleChildren:
Description: Compact style reduces the required amount of indentation.
EnforcedStyle: compact
Expand Down
6 changes: 5 additions & 1 deletion .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ Rakefile:
spec/spec_helper.rb:
mock_with: ':rspec'
coverage_report: true
hiera_config_ruby: File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/hiera/hiera.yaml'))
hiera_config_ruby: File.expand_path(File.join(File.dirname(__FILE__), 'fixtures/hiera/hiera.yaml'))
.gitpod.Dockerfile:
unmanaged: false
.gitpod.yml:
unmanaged: false
23 changes: 21 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,31 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [v5.4.0](https://github.com/puppetlabs/puppetlabs-kubernetes/tree/v5.4.0) (2020-11-30)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-kubernetes/compare/v5.3.0...v5.4.0)

### Added

- Add scheduler\_extra\_arguments parameter [\#451](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/451) ([treydock](https://github.com/treydock))
- Add configuration options for conntrack settings in v1beta1 and v1beta2 [\#447](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/447) ([Wiston999](https://github.com/Wiston999))

### Fixed

- Updates docker yumrepo default [\#436](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/436) ([JasonWhall](https://github.com/JasonWhall))

### UNCATEGORIZED PRS; LABEL THEM ON GITHUB

- Remove invalid kube-proxy config resourceContainer [\#448](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/448) ([treydock](https://github.com/treydock))
- Release mergeback version 5.3.0 [\#437](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/437) ([daianamezdrea](https://github.com/daianamezdrea))

## [v5.3.0](https://github.com/puppetlabs/puppetlabs-kubernetes/tree/v5.3.0) (2020-09-02)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-kubernetes/compare/v5.2.0...v5.3.0)

### Added

- pdksync - \(IAC-973\) - Update travis/appveyor to run on new default branch `main` [\#428](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/428) ([david22swan](https://github.com/david22swan))
- Package pinning and auto restart of etcd [\#420](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/420) ([scoopex](https://github.com/scoopex))
- Delegated PKI and adapt to k8s 1.15.3+ [\#412](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/412) ([Wiston999](https://github.com/Wiston999))
- Add option to set the dns domain in kubernetes cluster [\#405](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/405) ([BaronMsk](https://github.com/BaronMsk))
Expand Down Expand Up @@ -35,7 +54,6 @@ All notable changes to this project will be documented in this file. The format

### Added

- pdksync - \(IAC-973\) - Update travis/appveyor to run on new default branch `main` [\#428](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/428) ([david22swan](https://github.com/david22swan))
- Allow setting metricsBindAddress [\#377](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/377) ([TJM](https://github.com/TJM))
- Add docker\_extra\_daemon\_config for use when managing docker [\#376](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/376) ([mrwulf](https://github.com/mrwulf))
- Add support for managing Docker logging max-file and max-size settings. [\#358](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/358) ([nickperry](https://github.com/nickperry))
Expand Down Expand Up @@ -73,16 +91,17 @@ All notable changes to this project will be documented in this file. The format
- Expose ttl duration parameter [\#313](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/313) ([carabasdaniel](https://github.com/carabasdaniel))
- make proxy mode configurable [\#297](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/297) ([mrwulf](https://github.com/mrwulf))
- Fixed duplicate tlsBootstrapToken in config\_worker.yaml.erb for kubernetes 1.14 [\#287](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/287) ([Hillkorn](https://github.com/Hillkorn))
- Add extra arguments for API server and controller manager [\#282](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/282) ([fydai](https://github.com/fydai))

## [v4.0.1](https://github.com/puppetlabs/puppetlabs-kubernetes/tree/v4.0.1) (2019-05-13)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-kubernetes/compare/4.0.0...v4.0.1)

### Fixed

- Add extra arguments for API server and controller manager [\#282](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/282) ([fydai](https://github.com/fydai))
- cluster name missing tag brackets in worker config [\#280](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/280) ([jorhett](https://github.com/jorhett))
- Avoid log message about waiting for SA when it already exists [\#278](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/278) ([jorhett](https://github.com/jorhett))
- MODULES-8947 fixing bugs and tests [\#274](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/274) ([sheenaajay](https://github.com/sheenaajay))

# Version 4.0.0

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ group :development do
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 2.8.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.4', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
gem "bolt", '= 2.23.0' if Gem::Version.new(RUBY_VERSION.dup) > Gem::Version.new('2.5.0')
end

puppet_version = ENV['PUPPET_GEM_VERSION']
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ controllermanager_extra_volumes => {

Defaults to `{}`.

#### `scheduler_extra_arguments`

A string array of extra arguments passed to the scheduler.

Defaults to `[]`.

#### `create_repos`

Expand Down Expand Up @@ -383,13 +388,13 @@ Defaults to `https://apt.dockerproject.org/gpg`.

The YUM repo URL for the Docker packages.

Defaults to `https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64`.
Defaults to `https://download.docker.com/linux/centos/7/x86_64/stable`.

#### `docker_yum_gpgkey`

The URL for the Docker yum repo gpg key.

Defaults to `https://yum.dockerproject.org/gpg`.
Defaults to `https://download.docker.com/linux/centos/gpg`.

#### `docker_storage_driver`

Expand Down
108 changes: 105 additions & 3 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,10 @@ the files if they do not exist.
A hash of extra volume mounts mounted on the controller manager.
Defaults to []

[*scheduler_extra_arguments*]
A string array of extra arguments to be passed to scheduler.
Defaults to []

[*delegated_pki*]
Set to true if all required X509 certificates will be provided by external means. Setting this to true will ignore all *_crt and *_key including sa.key and sa.pub files.
Defaults to false
Expand Down Expand Up @@ -952,11 +956,11 @@ Defaults to ""

[*docker_yum_baseurl*]
The YUM repo URL for the Docker packages.
Defaults to https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
Defaults to https://download.docker.com/linux/centos/7/x86_64/stable

[*docker_yum_gpgkey*]
The URL for the Docker yum repo gpg key
Defaults to https://yum.dockerproject.org/gpg
Defaults to https://download.docker.com/linux/centos/gpg

[*docker_storage_driver*]
Storage Driver to be added to `/etc/docker/daemon.json`
Expand Down Expand Up @@ -1015,6 +1019,24 @@ Default to 24h
Set the metricsBindAddress (to allow prometheus)
Default to 127.0.0.1

[*conntrack_max_per_core*]
Maximum number of NAT connections to track per CPU core.
Set to 0 to leave the limit as-is and ignore conntrack_min.
Default to 32768

[*conntrack_min*]
Minimum number of conntrack entries to allocate, regardless of conntrack-max-per-core.
Set conntrack_max_per_core to 0 to leave the limit as-is
Default to 131072

[*conntrack_tcp_wait_timeout*]
NAT timeout for TCP connections in the CLOSE_WAIT state.
Default to 1h0m0s

[*conntrack_tcp_stablished_timeout*]
Idle timeout for established TCP connections (0 to leave as-is).
Default to 24h0m0s

Authors
-------

Expand Down Expand Up @@ -1166,7 +1188,7 @@ Data type: `Optional[String]`



Default value: `$facts['hostname']`
Default value: `$facts['networking']['hostname']`

##### `etcd_ip`

Expand Down Expand Up @@ -1454,6 +1476,14 @@ Data type: `Optional[Array]`



Default value: `[]`

##### `scheduler_extra_arguments`

Data type: `Optional[Array]`



Default value: `[]`

##### `service_cidr`
Expand Down Expand Up @@ -1872,6 +1902,38 @@ Data type: `Optional[String]`

Default value: ``undef``

##### `conntrack_max_per_core`

Data type: `Integer`



Default value: `32768`

##### `conntrack_min`

Data type: `Integer`



Default value: `131072`

##### `conntrack_tcp_wait_timeout`

Data type: `String`



Default value: `'1h0m0s'`

##### `conntrack_tcp_stablished_timeout`

Data type: `String`



Default value: `'24h0m0s'`

### `kubernetes::cluster_roles`

The kubernetes::cluster_roles class.
Expand Down Expand Up @@ -2288,6 +2350,14 @@ Data type: `Optional[Array]`

Default value: `$kubernetes::controllermanager_extra_arguments`

##### `scheduler_extra_arguments`

Data type: `Optional[Array]`



Default value: `$kubernetes::scheduler_extra_arguments`

##### `kubelet_extra_arguments`

Data type: `Optional[Array]`
Expand Down Expand Up @@ -2392,6 +2462,38 @@ Data type: `Stdlib::IP::Address`

Default value: `$kubernetes::metrics_bind_address`

##### `conntrack_max_per_core`

Data type: `Integer`



Default value: `$kubernetes::conntrack_max_per_core`

##### `conntrack_min`

Data type: `Integer`



Default value: `$kubernetes::conntrack_min`

##### `conntrack_tcp_wait_timeout`

Data type: `String`



Default value: `$kubernetes::conntrack_tcp_wait_timeout`

##### `conntrack_tcp_stablished_timeout`

Data type: `String`



Default value: `$kubernetes::conntrack_tcp_stablished_timeout`

### `kubernetes::config::worker`

Class kubernetes config_worker, populates worker config files with joinconfig
Expand Down
1 change: 1 addition & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--- {}
2 changes: 1 addition & 1 deletion examples/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# Learn more about module testing here:
# https://docs.puppet.com/guides/tests_smoke.html
#
include ::kubernetes
include kubernetes
21 changes: 21 additions & 0 deletions hiera.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
version: 5

defaults: # Used for any hierarchy level that omits these keys.
datadir: data # This path is relative to hiera.yaml's directory.
data_hash: yaml_data # Use the built-in YAML backend.

hierarchy:
- name: "osfamily/major release"
paths:
# Used to distinguish between Debian and Ubuntu
- "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
- "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
# Used for Solaris
- "os/%{facts.os.family}/%{facts.kernelrelease}.yaml"
- name: "osfamily"
paths:
- "os/%{facts.os.name}.yaml"
- "os/%{facts.os.family}.yaml"
- name: 'common'
path: 'common.yaml'
Loading