public function set($key, $value)
    {
        $kubernetesClient = $this->controller->getKubernetesClient();
        $storeNamespace = $this->namespace;
        $storeName = $this->name;

        $data = [
            'kind' => 'ConfigMap',
            'metadata' => [
                'name' => $storeName
            ],
            'data' => [
                $key => json_encode($value),
            ],
        ];

        $response = $kubernetesClient->request("/api/v1/namespaces/${storeNamespace}/configmaps/${storeName}", 'PATCH', [], $data);
        if ($response['status'] == 'Failure') {
            $this->controller->log($response['message']);

            return false;
        }

        return true;
    }
public function set($key, $value)
    {
        $kubernetesClient = $this->controller->getKubernetesClient();
        $storeNamespace = $this->namespace;
        $storeName = $this->name;

        $data = [
            'kind' => 'ConfigMap',
            'metadata' => [
                'name' => $storeName
            ],
            'data' => [
                $key => json_encode($value),
            ],
        ];

        $response = $kubernetesClient->request("/api/v1/namespaces/${storeNamespace}/configmaps/${storeName}", 'PATCH', [], $data);
        if ($response['status'] == 'Failure') {
            $this->controller->log($response['message']);

            return false;
        }

        return true;
    }
public function set ( $ key , $ value ) { $ kubernetesClient = $ this -> controller -> getKubernetesClient ( ) ; $ storeNamespace = $ this -> namespace ; $ storeName = $ this -> name ; $ data = [ 'kind' => 'ConfigMap' , 'metadata' => [ 'name' => $ storeName ] , 'data' => [ $ key => json_encode ( $ value ) , ] , ] ; $ response = $ kubernetesClient -> request ( "/api/v1/namespaces/${storeNamespace}/configmaps/${storeName}" , 'PATCH' , [ ] , $ data ) ; if ( $ response [ 'status' ] == 'Failure' ) { $ this -> controller -> log ( $ response [ 'message' ] ) ; return false ; } return true ; }
Set store value

@param $key
@param $value
@return bool
Set store value