Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for setStatusCondition (0.24 sec)

  1. staging/src/k8s.io/apimachinery/pkg/api/meta/conditions.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package meta
    
    import (
    	"time"
    
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    )
    
    // SetStatusCondition sets the corresponding condition in conditions to newCondition and returns true
    // if the conditions are changed by this call.
    // conditions must be non-nil.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 22 01:13:33 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/meta/conditions_test.go

    				Status:             metav1.ConditionTrue,
    				LastTransitionTime: metav1.Time{Time: oneHourBefore},
    			}},
    		},
    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			changed := SetStatusCondition(&test.conditions, test.toAdd)
    			if test.expectChanged != changed {
    				t.Errorf("expectChanged=%t != changed=%t", test.expectChanged, changed)
    			}
    			if !reflect.DeepEqual(test.conditions, test.expected) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 22 01:13:33 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  3. pkg/controller/disruption/disruption.go

    	newPdb := pdb.DeepCopy()
    	newPdb.Status.DisruptionsAllowed = 0
    
    	if newPdb.Status.Conditions == nil {
    		newPdb.Status.Conditions = make([]metav1.Condition, 0)
    	}
    	apimeta.SetStatusCondition(&newPdb.Status.Conditions, metav1.Condition{
    		Type:               policy.DisruptionAllowedCondition,
    		Status:             metav1.ConditionFalse,
    		Reason:             policy.SyncFailedReason,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 36.1K bytes
    - Viewed (0)
Back to top