Last updated 2 years ago
Default version: v1
v1
Starting with Kubernetes v1.21.0, ConfigMaps support immutability. If you do not specify the immutable() method, it will default to false:
immutable()
$cm = $this->cluster ->configmap() ->setName('certificates') ->setLabels(['tier' => 'backend']) ->setData([ 'key.pem' => '...', 'ca.pem' => '...', ]) ->create();
$cm = $this->cluster ->configmap() ... ->immutable() ->create(); $cm->isImmutable(); // true